(* Content-type: application/vnd.wolfram.mathematica *)

(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)

(* CreatedBy='Mathematica 12.0' *)

(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[       158,          7]
NotebookDataLength[    267152,       7587]
NotebookOptionsPosition[    253675,       7388]
NotebookOutlinePosition[    254256,       7410]
CellTagsIndexPosition[    254213,       7407]
WindowFrame->Normal*)

(* Beginning of Notebook Content *)
Notebook[{
Cell[BoxData[
 RowBox[{"Clear", "[", "\"\<Global`*\>\"", "]"}]], "Code",
 CellLabel->"In[67]:=",ExpressionUUID->"c2c3d3b2-108f-4033-8f1c-909768d07ea6"],

Cell[BoxData[
 RowBox[{
  RowBox[{"Off", "[", 
   RowBox[{"General", "::", "munfl"}], "]"}], ";"}]], "Code",
 CellLabel->"In[68]:=",ExpressionUUID->"54dd8744-439d-4386-b087-80d6b1a2d26f"],

Cell[BoxData[{
 RowBox[{
  RowBox[{"\[Lambda]", "=", "30"}], ";"}], "\n", 
 RowBox[{
  RowBox[{"nt", "=", 
   RowBox[{"-", "1"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"\[Gamma]", "=", 
   RowBox[{"1", "/", "10"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"TOL", "=", 
   RowBox[{"1", "/", "10"}]}], ";"}]}], "Code",
 CellChangeTimes->{{3.8653058086524744`*^9, 3.865305810093257*^9}, {
  3.865310076128306*^9, 
  3.8653100776103063`*^9}},ExpressionUUID->"ea1ffef1-7bd2-4aad-8591-\
08c9fe7fce4e"],

Cell[BoxData[
 RowBox[{
  RowBox[{"SetDirectory", "[", 
   RowBox[{"NotebookDirectory", "[", "]"}], "]"}], ";"}]], "Code",
 CellLabel->"In[75]:=",ExpressionUUID->"6beb8d45-ee52-487a-aa2d-eea63892328c"],

Cell[BoxData[
 RowBox[{
  RowBox[{"NN", "=", "400"}], ";"}]], "Code",
 CellLabel->"In[76]:=",ExpressionUUID->"6518b5b1-bee3-440a-8218-00adc9accdb5"],

Cell[BoxData[{
 RowBox[{
  RowBox[{"tempfile1", "=", 
   RowBox[{"FileNameJoin", "[", 
    RowBox[{"{", 
     RowBox[{
      RowBox[{"Directory", "[", "]"}], ",", "\"\<savedBoundary.wl\>\""}], 
     "}"}], "]"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"tempfile3", "=", 
   RowBox[{"FileNameJoin", "[", 
    RowBox[{"{", 
     RowBox[{
      RowBox[{"Directory", "[", "]"}], ",", 
      RowBox[{
       RowBox[{"ToString", "[", "\[Lambda]", "]"}], "<>", "\"\<-\>\"", "<>", 
       "\"\<savedHeaaisanH.wl\>\""}]}], "}"}], "]"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"tempfile5", "=", 
   RowBox[{"FileNameJoin", "[", 
    RowBox[{"{", 
     RowBox[{
      RowBox[{"Directory", "[", "]"}], ",", 
      RowBox[{
       RowBox[{"ToString", "[", "\[Lambda]", "]"}], "<>", "\"\<-\>\"", "<>", 
       RowBox[{"ToString", "[", "TT1", "]"}], "<>", 
       "\"\<ResultMarkov.wdx\>\""}]}], "}"}], "]"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"tempfile6", "=", 
   RowBox[{"FileNameJoin", "[", 
    RowBox[{"{", 
     RowBox[{
      RowBox[{"Directory", "[", "]"}], ",", 
      RowBox[{
       RowBox[{"ToString", "[", "\[Lambda]", "]"}], "<>", "\"\<-\>\"", "<>", 
       "\"\<core.mx\>\""}]}], "}"}], "]"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"tempfile7", "=", 
   RowBox[{"FileNameJoin", "[", 
    RowBox[{"{", 
     RowBox[{
      RowBox[{"Directory", "[", "]"}], ",", 
      RowBox[{
       RowBox[{"ToString", "[", "\[Lambda]", "]"}], "<>", "\"\<-\>\"", "<>", 
       RowBox[{"ToString", "[", "TT1", "]"}], "<>", "\"\<-\>\"", "<>", 
       "\"\<ResultJ234.wdx\>\""}]}], "}"}], "]"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"tempfile8", "=", 
   RowBox[{"FileNameJoin", "[", 
    RowBox[{"{", 
     RowBox[{
      RowBox[{"Directory", "[", "]"}], ",", 
      RowBox[{
       RowBox[{"ToString", "[", "\[Lambda]", "]"}], "<>", "\"\<-\>\"", "<>", 
       RowBox[{"ToString", "[", "TT1", "]"}], "<>", "\"\<-\>\"", "<>", 
       "\"\<CC.wdx\>\""}]}], "}"}], "]"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"tempfile13", "=", 
   RowBox[{"FileNameJoin", "[", 
    RowBox[{"{", 
     RowBox[{
      RowBox[{"Directory", "[", "]"}], ",", "\"\<email.wl\>\""}], "}"}], 
    "]"}]}], ";"}]}], "Code",
 CellChangeTimes->{{3.8653058679172745`*^9, 3.8653058683772745`*^9}, {
  3.865305930559494*^9, 3.865305931337493*^9}},
 CellLabel->"In[77]:=",ExpressionUUID->"21d6a4a5-c0f9-4dcb-85ba-1fec254874df"],

Cell[CellGroupData[{

Cell["The Action ", "Subtitle",
 CellChangeTimes->{{3.865305958044416*^9, 
  3.8653059720064955`*^9}},ExpressionUUID->"95dbb536-a941-4a6b-ab63-\
8cf68732cf61"],

Cell[BoxData[
 RowBox[{
  RowBox[{"Get", "[", "tempfile13", "]"}], ";"}]], "Code",
 CellLabel->"In[84]:=",ExpressionUUID->"83836997-625c-47dd-9e9b-18b7ffa3e3a3"],

Cell[BoxData[{
 RowBox[{
  RowBox[{
   RowBox[{"ArgM", "[", 
    RowBox[{"z_", ",", 
     RowBox[{"\[Sigma]_", ":", "0"}]}], "]"}], ":=", 
   RowBox[{
    RowBox[{"Arg", "[", 
     RowBox[{"z", " ", 
      RowBox[{"Exp", "[", 
       RowBox[{
        RowBox[{"-", "I"}], "*", 
        RowBox[{"(", 
         RowBox[{"\[Sigma]", "*", "Pi"}], ")"}]}], "]"}]}], "]"}], "+", 
    RowBox[{"\[Sigma]", "*", "Pi"}]}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"LogM", "[", 
   RowBox[{"z_", ",", 
    RowBox[{"\[Sigma]_", ":", "0"}]}], "]"}], ":=", 
  RowBox[{
   RowBox[{"Log", "[", 
    RowBox[{"z", " ", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", "I"}], "*", 
       RowBox[{"(", 
        RowBox[{"\[Sigma]", "*", "Pi"}], ")"}]}], "]"}]}], "]"}], "+", 
   RowBox[{"I", "*", "\[Sigma]", "*", "Pi"}]}]}]}], "Code",
 CellChangeTimes->{{3.8653059405262995`*^9, 3.8653059463364983`*^9}},
 CellLabel->"In[85]:=",ExpressionUUID->"b3e12f49-5e51-4827-823c-ef69869ba444"],

Cell[BoxData[{
 RowBox[{
  RowBox[{"Get", "[", "tempfile1", "]"}], ";"}], "\n", 
 RowBox[{
  RowBox[{"arv", "=", "Arv"}], ";", 
  RowBox[{"Arv", "=", 
   RowBox[{"\[Lambda]", "*", "Arv"}]}], ";"}], "\n"}], "Code",
 CellChangeTimes->{{3.865306790941538*^9, 3.865306796157642*^9}},
 CellLabel->"In[87]:=",ExpressionUUID->"7742c24f-a863-4465-970a-9a34a97c0707"],

Cell[BoxData[{
 RowBox[{
  RowBox[{"Indexg", "=", 
   RowBox[{"Table", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
       RowBox[{
        RowBox[{"Quotient", "[", 
         RowBox[{
          RowBox[{"x", "-", "1"}], ",", "6"}], "]"}], "+", "2"}], ",", 
       RowBox[{
        RowBox[{
         RowBox[{"Quotient", "[", 
          RowBox[{
           RowBox[{"Mod", "[", 
            RowBox[{
             RowBox[{"x", "-", "1"}], ",", "6"}], "]"}], ",", "3"}], "]"}], 
         "*", "2"}], "+", "1"}], ",", 
       RowBox[{
        RowBox[{"Mod", "[", 
         RowBox[{
          RowBox[{"x", "-", "1"}], ",", "3"}], "]"}], "+", "1"}]}], "}"}], 
     ",", 
     RowBox[{"{", 
      RowBox[{"x", ",", "1", ",", "24"}], "}"}]}], "]"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"Indexz", "=", 
   RowBox[{"Table", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
       RowBox[{
        RowBox[{"Quotient", "[", 
         RowBox[{
          RowBox[{"x", "-", "1"}], ",", "2"}], "]"}], "+", "1"}], ",", 
       RowBox[{
        RowBox[{"2", "*", 
         RowBox[{"Mod", "[", 
          RowBox[{
           RowBox[{"x", "-", "1"}], ",", "2"}], "]"}]}], "+", "1"}]}], "}"}], 
     ",", 
     RowBox[{"{", 
      RowBox[{"x", ",", "1", ",", "20"}], "}"}]}], "]"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"Indexgc", "=", 
   RowBox[{"Table", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
       RowBox[{
        RowBox[{"Quotient", "[", 
         RowBox[{
          RowBox[{"x", "-", "1"}], ",", "6"}], "]"}], "+", "2"}], ",", 
       RowBox[{
        RowBox[{
         RowBox[{"Quotient", "[", 
          RowBox[{
           RowBox[{"Mod", "[", 
            RowBox[{
             RowBox[{"x", "-", "1"}], ",", "6"}], "]"}], ",", "3"}], "]"}], 
         "*", "2"}], "+", "2"}], ",", 
       RowBox[{
        RowBox[{"Mod", "[", 
         RowBox[{
          RowBox[{"x", "-", "1"}], ",", "3"}], "]"}], "+", "1"}]}], "}"}], 
     ",", 
     RowBox[{"{", 
      RowBox[{"x", ",", "1", ",", "24"}], "}"}]}], "]"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"Indexzc", "=", 
   RowBox[{"Table", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
       RowBox[{
        RowBox[{"Quotient", "[", 
         RowBox[{
          RowBox[{"x", "-", "1"}], ",", "2"}], "]"}], "+", "1"}], ",", 
       RowBox[{
        RowBox[{"2", "*", 
         RowBox[{"Mod", "[", 
          RowBox[{
           RowBox[{"x", "-", "1"}], ",", "2"}], "]"}]}], "+", "2"}]}], "}"}], 
     ",", 
     RowBox[{"{", 
      RowBox[{"x", ",", "1", ",", "20"}], "}"}]}], "]"}]}], 
  ";"}], "\n"}], "Code",
 CellLabel->"In[89]:=",ExpressionUUID->"ddf4e606-7166-4732-88c4-d65045f0b2fa"],

Cell[BoxData[
 RowBox[{
  RowBox[{"J", "[", 
   RowBox[{"{", 
    RowBox[{"z0_", ",", "z1_"}], "}"}], "]"}], ":=", 
  RowBox[{"{", 
   RowBox[{
    RowBox[{"-", 
     RowBox[{"Conjugate", "[", "z1", "]"}]}], ",", 
    RowBox[{"Conjugate", "[", "z0", "]"}]}], "}"}]}]], "Code",
 CellLabel->"In[93]:=",ExpressionUUID->"c6080365-a519-40e0-a68f-94f3c77b869d"],

Cell[BoxData[{
 RowBox[{
  RowBox[{"EE", "=", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"2", ",", "1"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"1", ",", "3"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"4", ",", "1"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"1", ",", "5"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"3", ",", "2"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"2", ",", "4"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"5", ",", "2"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"4", ",", "3"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"3", ",", "5"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"5", ",", "4"}], "}"}]}], "}"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"EE", "=", 
   RowBox[{"Map", "[", 
    RowBox[{
     RowBox[{
      RowBox[{"Sort", "[", 
       RowBox[{"#", ",", "Less"}], "]"}], "&"}], ",", "EE"}], "]"}]}], 
  ";"}], "\n", 
 RowBox[{
  RowBox[{"Index", "=", 
   RowBox[{"Join", "[", 
    RowBox[{
    "Indexg", ",", "Indexz", ",", "EE", ",", "Indexgc", ",", "Indexzc", ",", 
     "EE"}], "]"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"\[Eta]", "=", 
   RowBox[{"DiagonalMatrix", "[", 
    RowBox[{"{", 
     RowBox[{
      RowBox[{"-", "1"}], ",", "1", ",", "1", ",", "1"}], "}"}], "]"}]}], 
  ";"}]}], "Code",
 CellLabel->"In[94]:=",ExpressionUUID->"f777f694-e656-48c4-8ae9-5638cee4b943"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{
    RowBox[{"MEXP", "[", 
     RowBox[{"x_", ",", "y_"}], "]"}], ":=", 
    RowBox[{"Block", "[", 
     RowBox[{
      RowBox[{"{", 
       RowBox[{"z1", ",", "z2", ",", "z3", ",", "out"}], "}"}], ",", 
      RowBox[{
       RowBox[{"z1", "=", 
        RowBox[{"1", "+", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{
            RowBox[{"x", "[", 
             RowBox[{"[", "1", "]"}], "]"}], "+", 
            RowBox[{"I", "*", 
             RowBox[{"y", "[", 
              RowBox[{"[", "1", "]"}], "]"}]}]}], ")"}], "/", 
          RowBox[{"Sqrt", "[", "2", "]"}]}]}]}], ";", 
       RowBox[{"z2", "=", 
        RowBox[{
         RowBox[{"(", 
          RowBox[{
           RowBox[{"x", "[", 
            RowBox[{"[", "2", "]"}], "]"}], "+", 
           RowBox[{"I", "*", 
            RowBox[{"y", "[", 
             RowBox[{"[", "2", "]"}], "]"}]}]}], ")"}], "/", 
         RowBox[{"Sqrt", "[", "2", "]"}]}]}], ";", 
       RowBox[{"z3", "=", 
        RowBox[{
         RowBox[{"(", 
          RowBox[{
           RowBox[{"x", "[", 
            RowBox[{"[", "3", "]"}], "]"}], "+", 
           RowBox[{"I", "*", 
            RowBox[{"y", "[", 
             RowBox[{"[", "3", "]"}], "]"}]}]}], ")"}], "/", 
         RowBox[{"Sqrt", "[", "2", "]"}]}]}], ";", 
       RowBox[{"out", "=", 
        RowBox[{"{", 
         RowBox[{
          RowBox[{"{", 
           RowBox[{"z1", ",", "z2"}], "}"}], ",", 
          RowBox[{"{", 
           RowBox[{"z3", ",", 
            RowBox[{
             RowBox[{"(", 
              RowBox[{"1", "+", 
               RowBox[{"z2", " ", "z3"}]}], ")"}], "/", "z1"}]}], "}"}]}], 
         "}"}]}]}]}], "]"}]}], ";"}], "\n"}]], "Code",
 CellLabel->"In[98]:=",ExpressionUUID->"c805bbc5-94a9-452e-9fd3-99c133fa2716"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{
    RowBox[{"GG", "[", "x_", "]"}], ":=", 
    RowBox[{"MEXP", "[", 
     RowBox[{
      RowBox[{"x", "[", 
       RowBox[{"[", "1", "]"}], "]"}], ",", 
      RowBox[{"x", "[", 
       RowBox[{"[", "2", "]"}], "]"}]}], "]"}]}], ";"}], "\n"}]], "Code",
 CellLabel->"In[99]:=",ExpressionUUID->"2653c7cc-dd04-4ea0-8d73-f16137868672"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{
    RowBox[{"CGG", "[", "x_", "]"}], ":=", 
    RowBox[{"Transpose", "[", 
     RowBox[{"MEXP", "[", 
      RowBox[{
       RowBox[{"x", "[", 
        RowBox[{"[", "3", "]"}], "]"}], ",", 
       RowBox[{"x", "[", 
        RowBox[{"[", "4", "]"}], "]"}]}], "]"}], "]"}]}], ";"}], "\n", 
  "\n"}]], "Code",
 CellLabel->
  "In[100]:=",ExpressionUUID->"ff0a4a83-eaf3-4560-9177-4a2886b46e0c"],

Cell[BoxData[{
 RowBox[{
  RowBox[{"PC1", "=", 
   RowBox[{"Table", "[", 
    RowBox[{
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{
        RowBox[{
         RowBox[{"EE", "[", 
          RowBox[{"[", 
           RowBox[{"x", ",", "1"}], "]"}], "]"}], "==", 
         RowBox[{"EE", "[", 
          RowBox[{"[", 
           RowBox[{"y", ",", "1"}], "]"}], "]"}]}], "&&", 
        RowBox[{
         RowBox[{"EE", "[", 
          RowBox[{"[", 
           RowBox[{"x", ",", "2"}], "]"}], "]"}], "==", 
         RowBox[{"EE", "[", 
          RowBox[{"[", 
           RowBox[{"y", ",", "2"}], "]"}], "]"}]}]}], ",", "1", ",", "0"}], 
      "]"}], ",", 
     RowBox[{"{", 
      RowBox[{"x", ",", "1", ",", "10"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"y", ",", "1", ",", "10"}], "}"}]}], "]"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"PC2", "=", 
   RowBox[{"Table", "[", 
    RowBox[{
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          RowBox[{
           RowBox[{"EE", "[", 
            RowBox[{"[", 
             RowBox[{"x", ",", "1"}], "]"}], "]"}], "==", 
           RowBox[{"EE", "[", 
            RowBox[{"[", 
             RowBox[{"y", ",", "1"}], "]"}], "]"}]}], "&&", 
          RowBox[{
           RowBox[{"EE", "[", 
            RowBox[{"[", 
             RowBox[{"x", ",", "2"}], "]"}], "]"}], "!=", 
           RowBox[{"EE", "[", 
            RowBox[{"[", 
             RowBox[{"y", ",", "2"}], "]"}], "]"}]}]}], ")"}], "||", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{
           RowBox[{"EE", "[", 
            RowBox[{"[", 
             RowBox[{"x", ",", "2"}], "]"}], "]"}], "==", 
           RowBox[{"EE", "[", 
            RowBox[{"[", 
             RowBox[{"y", ",", "2"}], "]"}], "]"}]}], "&&", 
          RowBox[{
           RowBox[{"EE", "[", 
            RowBox[{"[", 
             RowBox[{"x", ",", "1"}], "]"}], "]"}], "!=", 
           RowBox[{"EE", "[", 
            RowBox[{"[", 
             RowBox[{"y", ",", "1"}], "]"}], "]"}]}]}], ")"}]}], ",", "1", 
       ",", "0"}], "]"}], ",", 
     RowBox[{"{", 
      RowBox[{"x", ",", "1", ",", "10"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"y", ",", "1", ",", "10"}], "}"}]}], "]"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"PC3", "=", 
   RowBox[{"Table", "[", 
    RowBox[{
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{
        RowBox[{
         RowBox[{"EE", "[", 
          RowBox[{"[", 
           RowBox[{"x", ",", "1"}], "]"}], "]"}], "!=", 
         RowBox[{"EE", "[", 
          RowBox[{"[", 
           RowBox[{"y", ",", "1"}], "]"}], "]"}]}], "&&", 
        RowBox[{
         RowBox[{"EE", "[", 
          RowBox[{"[", 
           RowBox[{"x", ",", "2"}], "]"}], "]"}], "!=", 
         RowBox[{"EE", "[", 
          RowBox[{"[", 
           RowBox[{"y", ",", "2"}], "]"}], "]"}]}]}], ",", "1", ",", "0"}], 
      "]"}], ",", 
     RowBox[{"{", 
      RowBox[{"x", ",", "1", ",", "10"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"y", ",", "1", ",", "10"}], "}"}]}], "]"}]}], 
  ";"}], "\n"}], "Code",
 CellLabel->
  "In[101]:=",ExpressionUUID->"6e39e35a-2b9c-492b-9518-ae020d05a954"],

Cell[BoxData[
 RowBox[{
  RowBox[{"AP", "=", 
   RowBox[{
    RowBox[{"(", 
     RowBox[{"2", "/", "\[Gamma]"}], ")"}], "*", 
    RowBox[{"{", 
     RowBox[{
     "3.9408740523122887`", ",", "0.06122747081352031`", ",", 
      "0.7407565473927313`"}], "}"}]}]}], ";"}]], "Code",
 CellLabel->
  "In[104]:=",ExpressionUUID->"9b1d5b96-d26d-464a-b3fd-1724cac7aa2a"],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{"3.9408", "*", "2"}], "\n", 
 RowBox[{"0.0612", "*", "2"}], "\n", 
 RowBox[{"0.7407", "*", "2"}]}], "Code",
 CellLabel->
  "In[105]:=",ExpressionUUID->"65754b66-52a0-4c24-af2d-c99ac7c5159e"],

Cell[BoxData["7.8816`"], "Output",
 CellChangeTimes->{3.8653067818857617`*^9, 3.86530681334589*^9},
 CellLabel->
  "Out[105]=",ExpressionUUID->"fcc7698a-ce5a-4379-8edc-82f7ea8bcd43"],

Cell[BoxData["0.1224`"], "Output",
 CellChangeTimes->{3.8653067818857617`*^9, 3.86530681335089*^9},
 CellLabel->
  "Out[106]=",ExpressionUUID->"e21bd47a-d966-464c-8b2f-e37c093ce6a9"],

Cell[BoxData["1.4814`"], "Output",
 CellChangeTimes->{3.8653067818857617`*^9, 3.865306813354891*^9},
 CellLabel->
  "Out[107]=",ExpressionUUID->"c315cbd1-ff4b-4526-aa38-c95bda2ca440"]
}, Open  ]],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"Alpha", "=", 
    RowBox[{
     RowBox[{"(", 
      RowBox[{
       RowBox[{
        RowBox[{"AP", "[", 
         RowBox[{"[", "1", "]"}], "]"}], "*", "PC1"}], "+", 
       RowBox[{
        RowBox[{"AP", "[", 
         RowBox[{"[", "2", "]"}], "]"}], "*", "PC2"}], "+", 
       RowBox[{
        RowBox[{"AP", "[", 
         RowBox[{"[", "3", "]"}], "]"}], "*", "PC3"}]}], ")"}], "/", 
     "36.8"}]}], ";"}], "\n"}]], "Code",
 CellLabel->
  "In[108]:=",ExpressionUUID->"09a29111-6330-435c-b5f5-ab601d43fa8e"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"Action1", "[", "aax_", "]"}], ":=", 
   RowBox[{"Block", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
      "aa", ",", "spin", ",", "xx", ",", "zz", ",", "CGv", ",", "Gv", ",", 
       "zzv", ",", "czzv", ",", "Zv", ",", "CZv", ",", "Zv2", ",", "XZ", ",", 
       "ZX", ",", "A", ",", "B", ",", "SC", ",", "S"}], "}"}], ",", "\n", 
     RowBox[{
      RowBox[{"aa", "=", "aax"}], ";", "\n", 
      RowBox[{"zz", "=", 
       RowBox[{"Table", "[", 
        RowBox[{"0", ",", 
         RowBox[{"{", 
          RowBox[{"c", ",", "1", ",", "10"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"a", ",", "1", ",", "4"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"xx", "=", 
       RowBox[{"Table", "[", 
        RowBox[{"0", ",", 
         RowBox[{"{", 
          RowBox[{"c", ",", "1", ",", "5"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"a", ",", "1", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"b", ",", "1", ",", "3"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"spin", "=", 
       RowBox[{"Table", "[", 
        RowBox[{"0", ",", 
         RowBox[{"{", 
          RowBox[{"a", ",", "1", ",", "5"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"b", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"xx", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"Index", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "1"}], "]"}], "]"}], ",", 
            RowBox[{"Index", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "2"}], "]"}], "]"}], ",", 
            RowBox[{"Index", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "3"}], "]"}], "]"}]}], "]"}], "]"}], "=", 
         RowBox[{"aa", "[", 
          RowBox[{"[", "a", "]"}], "]"}]}], ",", 
        RowBox[{"{", 
         RowBox[{"a", ",", "1", ",", "24"}], "}"}]}], "]"}], ";", "\n", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"xx", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"Index", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "1"}], "]"}], "]"}], ",", 
            RowBox[{"Index", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "2"}], "]"}], "]"}], ",", 
            RowBox[{"Index", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "3"}], "]"}], "]"}]}], "]"}], "]"}], "=", 
         RowBox[{"aa", "[", 
          RowBox[{"[", "a", "]"}], "]"}]}], ",", 
        RowBox[{"{", 
         RowBox[{"a", ",", "55", ",", 
          RowBox[{"55", "+", "23"}]}], "}"}]}], "]"}], ";", "\n", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"zz", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"Index", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "1"}], "]"}], "]"}], ",", 
            RowBox[{"Index", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "2"}], "]"}], "]"}]}], "]"}], "]"}], "=", 
         RowBox[{"aa", "[", 
          RowBox[{"[", "a", "]"}], "]"}]}], ",", 
        RowBox[{"{", 
         RowBox[{"a", ",", "25", ",", "44"}], "}"}]}], "]"}], ";", "\n", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"spin", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"Index", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "1"}], "]"}], "]"}], ",", 
            RowBox[{"Index", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "2"}], "]"}], "]"}]}], "]"}], "]"}], "=", 
         RowBox[{"aa", "[", 
          RowBox[{"[", "a", "]"}], "]"}]}], ",", 
        RowBox[{"{", 
         RowBox[{"a", ",", "45", ",", "54"}], "}"}]}], "]"}], ";", "\n", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"zz", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"Index", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "1"}], "]"}], "]"}], ",", 
            RowBox[{"Index", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "2"}], "]"}], "]"}]}], "]"}], "]"}], "=", 
         RowBox[{"aa", "[", 
          RowBox[{"[", "a", "]"}], "]"}]}], ",", 
        RowBox[{"{", 
         RowBox[{"a", ",", "79", ",", 
          RowBox[{"79", "+", "19"}]}], "}"}]}], "]"}], ";", "\n", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"spin", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"Index", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "1"}], "]"}], "]"}], ",", 
            RowBox[{"Index", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "2"}], "]"}], "]"}]}], "]"}], "]"}], "=", 
         RowBox[{"aa", "[", 
          RowBox[{"[", "a", "]"}], "]"}]}], ",", 
        RowBox[{"{", 
         RowBox[{"a", ",", "99", ",", "108"}], "}"}]}], "]"}], ";", "\n", 
      RowBox[{"Gv", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{
          RowBox[{"gv", "[", 
           RowBox[{"[", "a", "]"}], "]"}], " ", ".", " ", 
          RowBox[{"GG", "[", 
           RowBox[{"xx", "[", 
            RowBox[{"[", "a", "]"}], "]"}], "]"}]}], ",", 
         RowBox[{"{", 
          RowBox[{"a", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"CGv", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{
          RowBox[{"CGG", "[", 
           RowBox[{"xx", "[", 
            RowBox[{"[", "a", "]"}], "]"}], "]"}], " ", ".", " ", 
          RowBox[{"ConjugateTranspose", "[", 
           RowBox[{"gv", "[", 
            RowBox[{"[", "a", "]"}], "]"}], "]"}]}], ",", 
         RowBox[{"{", 
          RowBox[{"a", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"zzv", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{
           RowBox[{"{", "0", "}"}], ",", 
           RowBox[{"{", "0", "}"}]}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"a", ",", "1", ",", "5"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"b", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"czzv", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{
           RowBox[{"{", "0", "}"}], ",", 
           RowBox[{"{", "0", "}"}]}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"a", ",", "1", ",", "5"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"b", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"zzv", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "1"}], "]"}], "]"}], ",", 
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "2"}], "]"}], "]"}]}], "]"}], "]"}], "=", 
         RowBox[{"{", 
          RowBox[{
           RowBox[{"{", "1", "}"}], ",", 
           RowBox[{"{", 
            RowBox[{
             RowBox[{
              RowBox[{"zv", "[", 
               RowBox[{"[", 
                RowBox[{
                 RowBox[{"EE", "[", 
                  RowBox[{"[", 
                   RowBox[{"a", ",", "1"}], "]"}], "]"}], ",", 
                 RowBox[{"EE", "[", 
                  RowBox[{"[", 
                   RowBox[{"a", ",", "2"}], "]"}], "]"}]}], "]"}], "]"}], "[", 
              RowBox[{"[", 
               RowBox[{"2", ",", "1"}], "]"}], "]"}], "+", 
             RowBox[{"(", 
              RowBox[{
               RowBox[{"zz", "[", 
                RowBox[{"[", 
                 RowBox[{"a", ",", "1"}], "]"}], "]"}], "+", 
               RowBox[{"I", "*", 
                RowBox[{"zz", "[", 
                 RowBox[{"[", 
                  RowBox[{"a", ",", "2"}], "]"}], "]"}]}]}], ")"}]}], "}"}]}],
           "}"}]}], ",", 
        RowBox[{"{", 
         RowBox[{"a", ",", "1", ",", "10"}], "}"}]}], "]"}], ";", "\n", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"zzv", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "2"}], "]"}], "]"}], ",", 
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "1"}], "]"}], "]"}]}], "]"}], "]"}], "=", 
         RowBox[{"zzv", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "1"}], "]"}], "]"}], ",", 
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "2"}], "]"}], "]"}]}], "]"}], "]"}]}], ",", 
        RowBox[{"{", 
         RowBox[{"a", ",", "1", ",", "10"}], "}"}]}], "]"}], ";", "\n", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"czzv", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "1"}], "]"}], "]"}], ",", 
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "2"}], "]"}], "]"}]}], "]"}], "]"}], "=", 
         RowBox[{"{", 
          RowBox[{
           RowBox[{"{", "1", "}"}], ",", 
           RowBox[{"{", 
            RowBox[{
             RowBox[{"Conjugate", "[", 
              RowBox[{
               RowBox[{"zv", "[", 
                RowBox[{"[", 
                 RowBox[{
                  RowBox[{"EE", "[", 
                   RowBox[{"[", 
                    RowBox[{"a", ",", "1"}], "]"}], "]"}], ",", 
                  RowBox[{"EE", "[", 
                   RowBox[{"[", 
                    RowBox[{"a", ",", "2"}], "]"}], "]"}]}], "]"}], "]"}], 
               "[", 
               RowBox[{"[", 
                RowBox[{"2", ",", "1"}], "]"}], "]"}], "]"}], "+", 
             RowBox[{"(", 
              RowBox[{
               RowBox[{"zz", "[", 
                RowBox[{"[", 
                 RowBox[{"a", ",", "3"}], "]"}], "]"}], "+", 
               RowBox[{"I", "*", 
                RowBox[{"zz", "[", 
                 RowBox[{"[", 
                  RowBox[{"a", ",", "4"}], "]"}], "]"}]}]}], ")"}]}], "}"}]}],
           "}"}]}], ",", 
        RowBox[{"{", 
         RowBox[{"a", ",", "1", ",", "10"}], "}"}]}], "]"}], ";", "\n", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"czzv", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "2"}], "]"}], "]"}], ",", 
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "1"}], "]"}], "]"}]}], "]"}], "]"}], "=", 
         RowBox[{"czzv", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "1"}], "]"}], "]"}], ",", 
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "2"}], "]"}], "]"}]}], "]"}], "]"}]}], ",", 
        RowBox[{"{", 
         RowBox[{"a", ",", "1", ",", "10"}], "}"}]}], "]"}], ";", "\n", 
      RowBox[{"Zv", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{"x", "==", "y"}], ",", 
           RowBox[{"{", 
            RowBox[{"0", ",", "0"}], "}"}], ",", 
           RowBox[{
            RowBox[{"CGv", "[", 
             RowBox[{"[", "x", "]"}], "]"}], " ", ".", " ", 
            RowBox[{"zzv", "[", 
             RowBox[{"[", 
              RowBox[{"x", ",", "y"}], "]"}], "]"}]}]}], "]"}], ",", 
         RowBox[{"{", 
          RowBox[{"x", ",", "1", ",", "5"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"y", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"CZv", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{"x", "==", "y"}], ",", 
           RowBox[{"{", 
            RowBox[{"0", ",", "0"}], "}"}], ",", 
           RowBox[{
            RowBox[{"Transpose", "[", 
             RowBox[{"czzv", "[", 
              RowBox[{"[", 
               RowBox[{"x", ",", "y"}], "]"}], "]"}], "]"}], " ", ".", " ", 
            RowBox[{"Gv", "[", 
             RowBox[{"[", "x", "]"}], "]"}]}]}], "]"}], ",", 
         RowBox[{"{", 
          RowBox[{"x", ",", "1", ",", "5"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"y", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"Zv2", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{"x", "==", "y"}], ",", "1", ",", 
           RowBox[{
            RowBox[{"(", 
             RowBox[{
              RowBox[{"CZv", "[", 
               RowBox[{"[", 
                RowBox[{"x", ",", "y"}], "]"}], "]"}], " ", ".", " ", 
              RowBox[{"Zv", "[", 
               RowBox[{"[", 
                RowBox[{"x", ",", "y"}], "]"}], "]"}]}], ")"}], "[", 
            RowBox[{"[", 
             RowBox[{"1", ",", "1"}], "]"}], "]"}]}], "]"}], ",", 
         RowBox[{"{", 
          RowBox[{"x", ",", "1", ",", "5"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"y", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"XZ", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{"x", "==", "y"}], ",", "1", ",", 
           RowBox[{
            RowBox[{"(", 
             RowBox[{
              RowBox[{"ConjugateTranspose", "[", 
               RowBox[{"J", "[", 
                RowBox[{"xv", "[", 
                 RowBox[{"[", 
                  RowBox[{"x", ",", "y"}], "]"}], "]"}], "]"}], "]"}], " ", 
              ".", " ", 
              RowBox[{"Zv", "[", 
               RowBox[{"[", 
                RowBox[{"x", ",", "y"}], "]"}], "]"}]}], ")"}], "[", 
            RowBox[{"[", 
             RowBox[{"1", ",", "1"}], "]"}], "]"}]}], "]"}], ",", 
         RowBox[{"{", 
          RowBox[{"x", ",", "1", ",", "5"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"y", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"ZX", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{"x", "==", "y"}], ",", "1", ",", 
           RowBox[{
            RowBox[{"(", 
             RowBox[{
              RowBox[{"CZv", "[", 
               RowBox[{"[", 
                RowBox[{"x", ",", "y"}], "]"}], "]"}], " ", ".", " ", 
              RowBox[{"xv", "[", 
               RowBox[{"[", 
                RowBox[{"x", ",", "y"}], "]"}], "]"}]}], ")"}], "[", 
            RowBox[{"[", 
             RowBox[{"1", ",", "1"}], "]"}], "]"}]}], "]"}], ",", 
         RowBox[{"{", 
          RowBox[{"x", ",", "1", ",", "5"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"y", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"A", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{
          RowBox[{"Log", "[", 
           RowBox[{"(", 
            RowBox[{
             RowBox[{"ZX", "[", 
              RowBox[{"[", 
               RowBox[{"x", ",", "y"}], "]"}], "]"}], "*", 
             RowBox[{"XZ", "[", 
              RowBox[{"[", 
               RowBox[{"y", ",", "x"}], "]"}], "]"}]}], ")"}], "]"}], "-", 
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "/", "2"}], ")"}], "*", 
           RowBox[{"Log", "[", 
            RowBox[{"(", 
             RowBox[{
              RowBox[{"Zv2", "[", 
               RowBox[{"[", 
                RowBox[{"x", ",", "y"}], "]"}], "]"}], "*", 
              RowBox[{"Zv2", "[", 
               RowBox[{"[", 
                RowBox[{"y", ",", "x"}], "]"}], "]"}]}], ")"}], "]"}]}]}], 
         ",", 
         RowBox[{"{", 
          RowBox[{"x", ",", "1", ",", "5"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"y", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"B", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{
            RowBox[{"(", 
             RowBox[{"1", "/", "2"}], ")"}], "*", 
            RowBox[{"Log", "[", 
             RowBox[{
              RowBox[{"Zv2", "[", 
               RowBox[{"[", 
                RowBox[{"y", ",", "x"}], "]"}], "]"}], "/", 
              RowBox[{"Zv2", "[", 
               RowBox[{"[", 
                RowBox[{"x", ",", "y"}], "]"}], "]"}]}], "]"}]}], ")"}], "*", 
          "I", "*", "\[Gamma]"}], ",", 
         RowBox[{"{", 
          RowBox[{"x", ",", "1", ",", "5"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"y", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"SC", "=", 
       RowBox[{"A", "+", "B"}]}], ";", "\n", 
      RowBox[{"2", "*", "SC"}]}]}], "\n", "]"}]}], "\n", "\n"}]], "Code",
 CellLabel->
  "In[109]:=",ExpressionUUID->"ad61ee8b-a77f-4273-a249-5f56881c5010"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"Action2", "[", "aax_", "]"}], ":=", 
   RowBox[{"Block", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
      "aa", ",", "xx", ",", "zz", ",", "cspin", ",", "cspin1", ",", "spin", 
       ",", "spin1", ",", "spin2", ",", "CGv", ",", "Gv", ",", "zzv", ",", 
       "czzv", ",", "Zv", ",", "CZv", ",", "Zv2", ",", "XZ", ",", "ZX", ",", 
       "A", ",", "B", ",", "SC", ",", "S", ",", "C1", ",", "C2"}], "}"}], ",",
      "\n", 
     RowBox[{
      RowBox[{"aa", "=", "aax"}], ";", "\n", 
      RowBox[{"zz", "=", 
       RowBox[{"Table", "[", 
        RowBox[{"0", ",", 
         RowBox[{"{", 
          RowBox[{"c", ",", "1", ",", "10"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"a", ",", "1", ",", "4"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"xx", "=", 
       RowBox[{"Table", "[", 
        RowBox[{"0", ",", 
         RowBox[{"{", 
          RowBox[{"c", ",", "1", ",", "5"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"a", ",", "1", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"b", ",", "1", ",", "3"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"spin", "=", 
       RowBox[{"Table", "[", 
        RowBox[{"0", ",", 
         RowBox[{"{", 
          RowBox[{"a", ",", "1", ",", "10"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"cspin", "=", 
       RowBox[{"Table", "[", 
        RowBox[{"0", ",", 
         RowBox[{"{", 
          RowBox[{"a", ",", "1", ",", "10"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"xx", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"Index", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "1"}], "]"}], "]"}], ",", 
            RowBox[{"Index", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "2"}], "]"}], "]"}], ",", 
            RowBox[{"Index", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "3"}], "]"}], "]"}]}], "]"}], "]"}], "=", 
         RowBox[{"aa", "[", 
          RowBox[{"[", "a", "]"}], "]"}]}], ",", 
        RowBox[{"{", 
         RowBox[{"a", ",", "1", ",", "24"}], "}"}]}], "]"}], ";", "\n", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"xx", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"Index", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "1"}], "]"}], "]"}], ",", 
            RowBox[{"Index", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "2"}], "]"}], "]"}], ",", 
            RowBox[{"Index", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "3"}], "]"}], "]"}]}], "]"}], "]"}], "=", 
         RowBox[{"aa", "[", 
          RowBox[{"[", "a", "]"}], "]"}]}], ",", 
        RowBox[{"{", 
         RowBox[{"a", ",", "55", ",", 
          RowBox[{"55", "+", "23"}]}], "}"}]}], "]"}], ";", "\n", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"zz", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"Index", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "1"}], "]"}], "]"}], ",", 
            RowBox[{"Index", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "2"}], "]"}], "]"}]}], "]"}], "]"}], "=", 
         RowBox[{"aa", "[", 
          RowBox[{"[", "a", "]"}], "]"}]}], ",", 
        RowBox[{"{", 
         RowBox[{"a", ",", "25", ",", "44"}], "}"}]}], "]"}], ";", "\n", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"spin", "[", 
          RowBox[{"[", 
           RowBox[{"a", "-", "44"}], "]"}], "]"}], "=", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{
            RowBox[{"aa", "[", 
             RowBox[{"[", "a", "]"}], "]"}], "+", 
            RowBox[{"I", "*", 
             RowBox[{"aa", "[", 
              RowBox[{"[", 
               RowBox[{"a", "+", "54"}], "]"}], "]"}]}]}], ")"}], "+", 
          RowBox[{"arv", "[", 
           RowBox[{"[", 
            RowBox[{
             RowBox[{"EE", "[", 
              RowBox[{"[", 
               RowBox[{
                RowBox[{"a", "-", "44"}], ",", "1"}], "]"}], "]"}], ",", 
             RowBox[{"EE", "[", 
              RowBox[{"[", 
               RowBox[{
                RowBox[{"a", "-", "44"}], ",", "2"}], "]"}], "]"}]}], "]"}], 
           "]"}]}]}], ",", 
        RowBox[{"{", 
         RowBox[{"a", ",", "45", ",", "54"}], "}"}]}], "]"}], ";", "\n", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"cspin", "[", 
          RowBox[{"[", 
           RowBox[{"a", "-", "44"}], "]"}], "]"}], "=", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{
            RowBox[{"aa", "[", 
             RowBox[{"[", "a", "]"}], "]"}], "-", 
            RowBox[{"I", "*", 
             RowBox[{"aa", "[", 
              RowBox[{"[", 
               RowBox[{"a", "+", "54"}], "]"}], "]"}]}]}], ")"}], "+", 
          RowBox[{"arv", "[", 
           RowBox[{"[", 
            RowBox[{
             RowBox[{"EE", "[", 
              RowBox[{"[", 
               RowBox[{
                RowBox[{"a", "-", "44"}], ",", "1"}], "]"}], "]"}], ",", 
             RowBox[{"EE", "[", 
              RowBox[{"[", 
               RowBox[{
                RowBox[{"a", "-", "44"}], ",", "2"}], "]"}], "]"}]}], "]"}], 
           "]"}]}]}], ",", 
        RowBox[{"{", 
         RowBox[{"a", ",", "45", ",", "54"}], "}"}]}], "]"}], ";", "\n", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"zz", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"Index", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "1"}], "]"}], "]"}], ",", 
            RowBox[{"Index", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "2"}], "]"}], "]"}]}], "]"}], "]"}], "=", 
         RowBox[{"aa", "[", 
          RowBox[{"[", "a", "]"}], "]"}]}], ",", 
        RowBox[{"{", 
         RowBox[{"a", ",", "79", ",", 
          RowBox[{"79", "+", "19"}]}], "}"}]}], "]"}], ";", "\n", 
      RowBox[{"Gv", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{
          RowBox[{"gv", "[", 
           RowBox[{"[", "a", "]"}], "]"}], " ", ".", " ", 
          RowBox[{"GG", "[", 
           RowBox[{"xx", "[", 
            RowBox[{"[", "a", "]"}], "]"}], "]"}]}], ",", 
         RowBox[{"{", 
          RowBox[{"a", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"CGv", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{
          RowBox[{"CGG", "[", 
           RowBox[{"xx", "[", 
            RowBox[{"[", "a", "]"}], "]"}], "]"}], " ", ".", " ", 
          RowBox[{"ConjugateTranspose", "[", 
           RowBox[{"gv", "[", 
            RowBox[{"[", "a", "]"}], "]"}], "]"}]}], ",", 
         RowBox[{"{", 
          RowBox[{"a", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"zzv", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{
           RowBox[{"{", "0", "}"}], ",", 
           RowBox[{"{", "0", "}"}]}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"a", ",", "1", ",", "5"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"b", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"czzv", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{
           RowBox[{"{", "0", "}"}], ",", 
           RowBox[{"{", "0", "}"}]}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"a", ",", "1", ",", "5"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"b", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"zzv", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "1"}], "]"}], "]"}], ",", 
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "2"}], "]"}], "]"}]}], "]"}], "]"}], "=", 
         RowBox[{"{", 
          RowBox[{
           RowBox[{"{", "1", "}"}], ",", 
           RowBox[{"{", 
            RowBox[{
             RowBox[{
              RowBox[{"zv", "[", 
               RowBox[{"[", 
                RowBox[{
                 RowBox[{"EE", "[", 
                  RowBox[{"[", 
                   RowBox[{"a", ",", "1"}], "]"}], "]"}], ",", 
                 RowBox[{"EE", "[", 
                  RowBox[{"[", 
                   RowBox[{"a", ",", "2"}], "]"}], "]"}]}], "]"}], "]"}], "[", 
              RowBox[{"[", 
               RowBox[{"2", ",", "1"}], "]"}], "]"}], "+", 
             RowBox[{"(", 
              RowBox[{
               RowBox[{"zz", "[", 
                RowBox[{"[", 
                 RowBox[{"a", ",", "1"}], "]"}], "]"}], "+", 
               RowBox[{"I", "*", 
                RowBox[{"zz", "[", 
                 RowBox[{"[", 
                  RowBox[{"a", ",", "2"}], "]"}], "]"}]}]}], ")"}]}], "}"}]}],
           "}"}]}], ",", 
        RowBox[{"{", 
         RowBox[{"a", ",", "1", ",", "10"}], "}"}]}], "]"}], ";", "\n", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"zzv", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "2"}], "]"}], "]"}], ",", 
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "1"}], "]"}], "]"}]}], "]"}], "]"}], "=", 
         RowBox[{"zzv", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "1"}], "]"}], "]"}], ",", 
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "2"}], "]"}], "]"}]}], "]"}], "]"}]}], ",", 
        RowBox[{"{", 
         RowBox[{"a", ",", "1", ",", "10"}], "}"}]}], "]"}], ";", "\n", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"czzv", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "1"}], "]"}], "]"}], ",", 
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "2"}], "]"}], "]"}]}], "]"}], "]"}], "=", 
         RowBox[{"{", 
          RowBox[{
           RowBox[{"{", "1", "}"}], ",", 
           RowBox[{"{", 
            RowBox[{
             RowBox[{"Conjugate", "[", 
              RowBox[{
               RowBox[{"zv", "[", 
                RowBox[{"[", 
                 RowBox[{
                  RowBox[{"EE", "[", 
                   RowBox[{"[", 
                    RowBox[{"a", ",", "1"}], "]"}], "]"}], ",", 
                  RowBox[{"EE", "[", 
                   RowBox[{"[", 
                    RowBox[{"a", ",", "2"}], "]"}], "]"}]}], "]"}], "]"}], 
               "[", 
               RowBox[{"[", 
                RowBox[{"2", ",", "1"}], "]"}], "]"}], "]"}], "+", 
             RowBox[{"(", 
              RowBox[{
               RowBox[{"zz", "[", 
                RowBox[{"[", 
                 RowBox[{"a", ",", "3"}], "]"}], "]"}], "+", 
               RowBox[{"I", "*", 
                RowBox[{"zz", "[", 
                 RowBox[{"[", 
                  RowBox[{"a", ",", "4"}], "]"}], "]"}]}]}], ")"}]}], "}"}]}],
           "}"}]}], ",", 
        RowBox[{"{", 
         RowBox[{"a", ",", "1", ",", "10"}], "}"}]}], "]"}], ";", "\n", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"czzv", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "2"}], "]"}], "]"}], ",", 
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "1"}], "]"}], "]"}]}], "]"}], "]"}], "=", 
         RowBox[{"czzv", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "1"}], "]"}], "]"}], ",", 
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "2"}], "]"}], "]"}]}], "]"}], "]"}]}], ",", 
        RowBox[{"{", 
         RowBox[{"a", ",", "1", ",", "10"}], "}"}]}], "]"}], ";", "\n", 
      RowBox[{"Zv", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{"x", "==", "y"}], ",", 
           RowBox[{"{", 
            RowBox[{"0", ",", "0"}], "}"}], ",", 
           RowBox[{
            RowBox[{"CGv", "[", 
             RowBox[{"[", "x", "]"}], "]"}], " ", ".", " ", 
            RowBox[{"zzv", "[", 
             RowBox[{"[", 
              RowBox[{"x", ",", "y"}], "]"}], "]"}]}]}], "]"}], ",", 
         RowBox[{"{", 
          RowBox[{"x", ",", "1", ",", "5"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"y", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"CZv", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{"x", "==", "y"}], ",", 
           RowBox[{"{", 
            RowBox[{"0", ",", "0"}], "}"}], ",", 
           RowBox[{
            RowBox[{"Transpose", "[", 
             RowBox[{"czzv", "[", 
              RowBox[{"[", 
               RowBox[{"x", ",", "y"}], "]"}], "]"}], "]"}], " ", ".", " ", 
            RowBox[{"Gv", "[", 
             RowBox[{"[", "x", "]"}], "]"}]}]}], "]"}], ",", 
         RowBox[{"{", 
          RowBox[{"x", ",", "1", ",", "5"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"y", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"Zv2", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{"x", "==", "y"}], ",", "1", ",", 
           RowBox[{
            RowBox[{"(", 
             RowBox[{
              RowBox[{"CZv", "[", 
               RowBox[{"[", 
                RowBox[{"x", ",", "y"}], "]"}], "]"}], " ", ".", " ", 
              RowBox[{"Zv", "[", 
               RowBox[{"[", 
                RowBox[{"x", ",", "y"}], "]"}], "]"}]}], ")"}], "[", 
            RowBox[{"[", 
             RowBox[{"1", ",", "1"}], "]"}], "]"}]}], "]"}], ",", 
         RowBox[{"{", 
          RowBox[{"x", ",", "1", ",", "5"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"y", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"XZ", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{"x", "==", "y"}], ",", "1", ",", 
           RowBox[{
            RowBox[{"(", 
             RowBox[{
              RowBox[{"ConjugateTranspose", "[", 
               RowBox[{"J", "[", 
                RowBox[{"xv", "[", 
                 RowBox[{"[", 
                  RowBox[{"x", ",", "y"}], "]"}], "]"}], "]"}], "]"}], " ", 
              ".", " ", 
              RowBox[{"Zv", "[", 
               RowBox[{"[", 
                RowBox[{"x", ",", "y"}], "]"}], "]"}]}], ")"}], "[", 
            RowBox[{"[", 
             RowBox[{"1", ",", "1"}], "]"}], "]"}]}], "]"}], ",", 
         RowBox[{"{", 
          RowBox[{"x", ",", "1", ",", "5"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"y", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"ZX", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{"x", "==", "y"}], ",", "1", ",", 
           RowBox[{
            RowBox[{"(", 
             RowBox[{
              RowBox[{"CZv", "[", 
               RowBox[{"[", 
                RowBox[{"x", ",", "y"}], "]"}], "]"}], " ", ".", " ", 
              RowBox[{"xv", "[", 
               RowBox[{"[", 
                RowBox[{"x", ",", "y"}], "]"}], "]"}]}], ")"}], "[", 
            RowBox[{"[", 
             RowBox[{"1", ",", "1"}], "]"}], "]"}]}], "]"}], ",", 
         RowBox[{"{", 
          RowBox[{"x", ",", "1", ",", "5"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"y", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"A", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{
          RowBox[{"Log", "[", 
           RowBox[{"(", 
            RowBox[{
             RowBox[{"ZX", "[", 
              RowBox[{"[", 
               RowBox[{"x", ",", "y"}], "]"}], "]"}], "*", 
             RowBox[{"XZ", "[", 
              RowBox[{"[", 
               RowBox[{"y", ",", "x"}], "]"}], "]"}]}], ")"}], "]"}], "-", 
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "/", "2"}], ")"}], "*", 
           RowBox[{"Log", "[", 
            RowBox[{"(", 
             RowBox[{
              RowBox[{"Zv2", "[", 
               RowBox[{"[", 
                RowBox[{"x", ",", "y"}], "]"}], "]"}], "*", 
              RowBox[{"Zv2", "[", 
               RowBox[{"[", 
                RowBox[{"y", ",", "x"}], "]"}], "]"}]}], ")"}], "]"}]}]}], 
         ",", 
         RowBox[{"{", 
          RowBox[{"x", ",", "1", ",", "5"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"y", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"(*", 
       RowBox[{
        RowBox[{
         RowBox[{"A", "[", 
          RowBox[{"[", 
           RowBox[{"1", ",", "5"}], "]"}], "]"}], "=", 
         RowBox[{
          RowBox[{"LogM", "[", 
           RowBox[{
            RowBox[{"(", 
             RowBox[{
              RowBox[{"ZX", "[", 
               RowBox[{"[", 
                RowBox[{"1", ",", "5"}], "]"}], "]"}], "*", 
              RowBox[{"XZ", "[", 
               RowBox[{"[", 
                RowBox[{"5", ",", "1"}], "]"}], "]"}]}], ")"}], ",", "1"}], 
           "]"}], "-", 
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "/", "2"}], ")"}], "*", 
           RowBox[{"Log", "[", 
            RowBox[{"(", 
             RowBox[{
              RowBox[{"Zv2", "[", 
               RowBox[{"[", 
                RowBox[{"1", ",", "5"}], "]"}], "]"}], "*", 
              RowBox[{"Zv2", "[", 
               RowBox[{"[", 
                RowBox[{"5", ",", "1"}], "]"}], "]"}]}], ")"}], "]"}]}]}]}], 
        ";"}], "*)"}], "\n", 
      RowBox[{"B", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{
            RowBox[{"(", 
             RowBox[{"1", "/", "2"}], ")"}], "*", 
            RowBox[{"Log", "[", 
             RowBox[{
              RowBox[{"Zv2", "[", 
               RowBox[{"[", 
                RowBox[{"y", ",", "x"}], "]"}], "]"}], "/", 
              RowBox[{"Zv2", "[", 
               RowBox[{"[", 
                RowBox[{"x", ",", "y"}], "]"}], "]"}]}], "]"}]}], ")"}], "*", 
          "I", "*", "\[Gamma]"}], ",", 
         RowBox[{"{", 
          RowBox[{"x", ",", "1", ",", "5"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"y", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"spin1", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{
            RowBox[{"spin", "[", 
             RowBox[{"[", "a", "]"}], "]"}], "-", 
            RowBox[{"arv", "[", 
             RowBox[{"[", 
              RowBox[{
               RowBox[{"EE", "[", 
                RowBox[{"[", 
                 RowBox[{"a", ",", "1"}], "]"}], "]"}], ",", 
               RowBox[{"EE", "[", 
                RowBox[{"[", 
                 RowBox[{"a", ",", "2"}], "]"}], "]"}]}], "]"}], "]"}]}], 
           ")"}], "/", 
          RowBox[{"Sqrt", "[", 
           RowBox[{"arv", "[", 
            RowBox[{"[", 
             RowBox[{
              RowBox[{"EE", "[", 
               RowBox[{"[", 
                RowBox[{"a", ",", "1"}], "]"}], "]"}], ",", 
              RowBox[{"EE", "[", 
               RowBox[{"[", 
                RowBox[{"a", ",", "2"}], "]"}], "]"}]}], "]"}], "]"}], 
           "]"}]}], ",", 
         RowBox[{"{", 
          RowBox[{"a", ",", "1", ",", "10"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"cspin1", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{
            RowBox[{"cspin", "[", 
             RowBox[{"[", "a", "]"}], "]"}], "-", 
            RowBox[{"arv", "[", 
             RowBox[{"[", 
              RowBox[{
               RowBox[{"EE", "[", 
                RowBox[{"[", 
                 RowBox[{"a", ",", "1"}], "]"}], "]"}], ",", 
               RowBox[{"EE", "[", 
                RowBox[{"[", 
                 RowBox[{"a", ",", "2"}], "]"}], "]"}]}], "]"}], "]"}]}], 
           ")"}], "/", 
          RowBox[{"Sqrt", "[", 
           RowBox[{"arv", "[", 
            RowBox[{"[", 
             RowBox[{
              RowBox[{"EE", "[", 
               RowBox[{"[", 
                RowBox[{"a", ",", "1"}], "]"}], "]"}], ",", 
              RowBox[{"EE", "[", 
               RowBox[{"[", 
                RowBox[{"a", ",", "2"}], "]"}], "]"}]}], "]"}], "]"}], 
           "]"}]}], ",", 
         RowBox[{"{", 
          RowBox[{"a", ",", "1", ",", "10"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"spin2", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{"(", 
          RowBox[{
           RowBox[{"spin", "[", 
            RowBox[{"[", "a", "]"}], "]"}], "-", 
           RowBox[{"arv", "[", 
            RowBox[{"[", 
             RowBox[{
              RowBox[{"EE", "[", 
               RowBox[{"[", 
                RowBox[{"a", ",", "1"}], "]"}], "]"}], ",", 
              RowBox[{"EE", "[", 
               RowBox[{"[", 
                RowBox[{"a", ",", "2"}], "]"}], "]"}]}], "]"}], "]"}]}], 
          ")"}], ",", 
         RowBox[{"{", 
          RowBox[{"a", ",", "1", ",", "10"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"C1", "=", 
       RowBox[{
        RowBox[{"-", 
         RowBox[{"(", 
          RowBox[{"1", "/", "2"}], ")"}]}], "*", "\[Gamma]", "*", 
        RowBox[{
         RowBox[{"(", 
          RowBox[{
           RowBox[{"{", "spin1", "}"}], " ", ".", " ", "Alpha", " ", ".", " ", 
           RowBox[{"Transpose", "[", 
            RowBox[{"{", "spin1", "}"}], "]"}]}], ")"}], "[", 
         RowBox[{"[", 
          RowBox[{"1", ",", "1"}], "]"}], "]"}]}]}], ";", "\n", 
      RowBox[{"C2", "=", 
       RowBox[{"\[Gamma]", "*", "I", "*", 
        RowBox[{"Sum", "[", 
         RowBox[{
          RowBox[{
           RowBox[{"spin2", "[", 
            RowBox[{"[", "a", "]"}], "]"}], "*", 
           RowBox[{"pp", "[", 
            RowBox[{"[", 
             RowBox[{
              RowBox[{"Index", "[", 
               RowBox[{"[", 
                RowBox[{
                 RowBox[{"a", "+", "44"}], ",", "1"}], "]"}], "]"}], ",", 
              RowBox[{"Index", "[", 
               RowBox[{"[", 
                RowBox[{
                 RowBox[{"a", "+", "44"}], ",", "2"}], "]"}], "]"}]}], "]"}], 
            "]"}]}], ",", 
          RowBox[{"{", 
           RowBox[{"a", ",", "1", ",", "10"}], "}"}]}], "]"}]}]}], ";", "\n", 
      RowBox[{"SC", "=", 
       RowBox[{"A", "+", "B"}]}], ";", 
      RowBox[{"S", "=", 
       RowBox[{"Sum", "[", 
        RowBox[{
         RowBox[{"2", "*", 
          RowBox[{"spin", "[", 
           RowBox[{"[", "x", "]"}], "]"}], "*", 
          RowBox[{"SC", "[", 
           RowBox[{"[", 
            RowBox[{
             RowBox[{"EE", "[", 
              RowBox[{"[", 
               RowBox[{"x", ",", "1"}], "]"}], "]"}], ",", 
             RowBox[{"EE", "[", 
              RowBox[{"[", 
               RowBox[{"x", ",", "2"}], "]"}], "]"}]}], "]"}], "]"}]}], ",", 
         RowBox[{"{", 
          RowBox[{"x", ",", "1", ",", "10"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"(", 
       RowBox[{"S", "+", "C1", "-", "C2"}], ")"}]}]}], "\n", "]"}]}], 
  "\n"}]], "Code",
 CellLabel->
  "In[112]:=",ExpressionUUID->"0e5db573-1eee-4bde-a3b2-21b0d993c90d"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"Action3", "[", "aax_", "]"}], ":=", 
   RowBox[{"Block", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
      "aa", ",", "xx", ",", "zz", ",", "spin", ",", "spin1", ",", "spin2", 
       ",", "CGv", ",", "Gv", ",", "zzv", ",", "czzv", ",", "Zv", ",", "CZv", 
       ",", "Zv2", ",", "XZ", ",", "ZX", ",", "A", ",", "B", ",", "SC", ",", 
       "S", ",", "C1", ",", "C2", ",", "ZM", ",", "GM", ",", "CCC", ",", 
       "sspin"}], "}"}], ",", "\n", 
     RowBox[{
      RowBox[{"aa", "=", "aax"}], ";", "\n", 
      RowBox[{"zz", "=", 
       RowBox[{"Table", "[", 
        RowBox[{"0", ",", 
         RowBox[{"{", 
          RowBox[{"c", ",", "1", ",", "10"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"a", ",", "1", ",", "4"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"xx", "=", 
       RowBox[{"Table", "[", 
        RowBox[{"0", ",", 
         RowBox[{"{", 
          RowBox[{"c", ",", "1", ",", "5"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"a", ",", "1", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"b", ",", "1", ",", "3"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"spin", "=", 
       RowBox[{"Table", "[", 
        RowBox[{"0", ",", 
         RowBox[{"{", 
          RowBox[{"a", ",", "1", ",", "5"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"b", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"sspin", "=", 
       RowBox[{"Table", "[", 
        RowBox[{"0", ",", 
         RowBox[{"{", 
          RowBox[{"a", ",", "1", ",", "5"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"b", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"xx", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"Index", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "1"}], "]"}], "]"}], ",", 
            RowBox[{"Index", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "2"}], "]"}], "]"}], ",", 
            RowBox[{"Index", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "3"}], "]"}], "]"}]}], "]"}], "]"}], "=", 
         RowBox[{"aa", "[", 
          RowBox[{"[", "a", "]"}], "]"}]}], ",", 
        RowBox[{"{", 
         RowBox[{"a", ",", "1", ",", "24"}], "}"}]}], "]"}], ";", "\n", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"xx", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"Index", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "1"}], "]"}], "]"}], ",", 
            RowBox[{"Index", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "2"}], "]"}], "]"}], ",", 
            RowBox[{"Index", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "3"}], "]"}], "]"}]}], "]"}], "]"}], "=", 
         RowBox[{"aa", "[", 
          RowBox[{"[", "a", "]"}], "]"}]}], ",", 
        RowBox[{"{", 
         RowBox[{"a", ",", "55", ",", 
          RowBox[{"55", "+", "23"}]}], "}"}]}], "]"}], ";", "\n", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"zz", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"Index", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "1"}], "]"}], "]"}], ",", 
            RowBox[{"Index", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "2"}], "]"}], "]"}]}], "]"}], "]"}], "=", 
         RowBox[{"aa", "[", 
          RowBox[{"[", "a", "]"}], "]"}]}], ",", 
        RowBox[{"{", 
         RowBox[{"a", ",", "25", ",", "44"}], "}"}]}], "]"}], ";", "\n", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"spin", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{
               RowBox[{"a", "-", "44"}], ",", "1"}], "]"}], "]"}], ",", 
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{
               RowBox[{"a", "-", "44"}], ",", "2"}], "]"}], "]"}]}], "]"}], 
          "]"}], "=", 
         RowBox[{
          RowBox[{
           RowBox[{"(", 
            RowBox[{
             RowBox[{"aa", "[", 
              RowBox[{"[", "a", "]"}], "]"}], "+", 
             RowBox[{"I", "*", 
              RowBox[{"aa", "[", 
               RowBox[{"[", 
                RowBox[{"a", "+", "54"}], "]"}], "]"}]}]}], ")"}], "*", 
           "\[Lambda]"}], "+", 
          RowBox[{"Arv", "[", 
           RowBox[{"[", 
            RowBox[{
             RowBox[{"EE", "[", 
              RowBox[{"[", 
               RowBox[{
                RowBox[{"a", "-", "44"}], ",", "1"}], "]"}], "]"}], ",", 
             RowBox[{"EE", "[", 
              RowBox[{"[", 
               RowBox[{
                RowBox[{"a", "-", "44"}], ",", "2"}], "]"}], "]"}]}], "]"}], 
           "]"}]}]}], ",", 
        RowBox[{"{", 
         RowBox[{"a", ",", "45", ",", "54"}], "}"}]}], "]"}], ";", "\n", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"spin", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{
               RowBox[{"a", "-", "44"}], ",", "2"}], "]"}], "]"}], ",", 
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{
               RowBox[{"a", "-", "44"}], ",", "1"}], "]"}], "]"}]}], "]"}], 
          "]"}], "=", 
         RowBox[{
          RowBox[{
           RowBox[{"(", 
            RowBox[{
             RowBox[{"aa", "[", 
              RowBox[{"[", "a", "]"}], "]"}], "+", 
             RowBox[{"I", "*", 
              RowBox[{"aa", "[", 
               RowBox[{"[", 
                RowBox[{"a", "+", "54"}], "]"}], "]"}]}]}], ")"}], "*", 
           "\[Lambda]"}], "+", 
          RowBox[{"Arv", "[", 
           RowBox[{"[", 
            RowBox[{
             RowBox[{"EE", "[", 
              RowBox[{"[", 
               RowBox[{
                RowBox[{"a", "-", "44"}], ",", "1"}], "]"}], "]"}], ",", 
             RowBox[{"EE", "[", 
              RowBox[{"[", 
               RowBox[{
                RowBox[{"a", "-", "44"}], ",", "2"}], "]"}], "]"}]}], "]"}], 
           "]"}]}]}], ",", 
        RowBox[{"{", 
         RowBox[{"a", ",", "45", ",", "54"}], "}"}]}], "]"}], ";", "\n", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"sspin", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{
               RowBox[{"a", "-", "44"}], ",", "1"}], "]"}], "]"}], ",", 
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{
               RowBox[{"a", "-", "44"}], ",", "2"}], "]"}], "]"}]}], "]"}], 
          "]"}], "=", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{
            RowBox[{"aa", "[", 
             RowBox[{"[", "a", "]"}], "]"}], "+", 
            RowBox[{"I", "*", 
             RowBox[{"aa", "[", 
              RowBox[{"[", 
               RowBox[{"a", "+", "54"}], "]"}], "]"}]}]}], ")"}], "+", 
          RowBox[{"arv", "[", 
           RowBox[{"[", 
            RowBox[{
             RowBox[{"EE", "[", 
              RowBox[{"[", 
               RowBox[{
                RowBox[{"a", "-", "44"}], ",", "1"}], "]"}], "]"}], ",", 
             RowBox[{"EE", "[", 
              RowBox[{"[", 
               RowBox[{
                RowBox[{"a", "-", "44"}], ",", "2"}], "]"}], "]"}]}], "]"}], 
           "]"}]}]}], ",", 
        RowBox[{"{", 
         RowBox[{"a", ",", "45", ",", "54"}], "}"}]}], "]"}], ";", "\n", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"sspin", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{
               RowBox[{"a", "-", "44"}], ",", "2"}], "]"}], "]"}], ",", 
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{
               RowBox[{"a", "-", "44"}], ",", "1"}], "]"}], "]"}]}], "]"}], 
          "]"}], "=", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{
            RowBox[{"aa", "[", 
             RowBox[{"[", "a", "]"}], "]"}], "+", 
            RowBox[{"I", "*", 
             RowBox[{"aa", "[", 
              RowBox[{"[", 
               RowBox[{"a", "+", "54"}], "]"}], "]"}]}]}], ")"}], "+", 
          RowBox[{"arv", "[", 
           RowBox[{"[", 
            RowBox[{
             RowBox[{"EE", "[", 
              RowBox[{"[", 
               RowBox[{
                RowBox[{"a", "-", "44"}], ",", "1"}], "]"}], "]"}], ",", 
             RowBox[{"EE", "[", 
              RowBox[{"[", 
               RowBox[{
                RowBox[{"a", "-", "44"}], ",", "2"}], "]"}], "]"}]}], "]"}], 
           "]"}]}]}], ",", 
        RowBox[{"{", 
         RowBox[{"a", ",", "45", ",", "54"}], "}"}]}], "]"}], ";", "\n", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"zz", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"Index", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "1"}], "]"}], "]"}], ",", 
            RowBox[{"Index", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "2"}], "]"}], "]"}]}], "]"}], "]"}], "=", 
         RowBox[{"aa", "[", 
          RowBox[{"[", "a", "]"}], "]"}]}], ",", 
        RowBox[{"{", 
         RowBox[{"a", ",", "79", ",", 
          RowBox[{"79", "+", "19"}]}], "}"}]}], "]"}], ";", "\n", 
      RowBox[{"Gv", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{
          RowBox[{"gv", "[", 
           RowBox[{"[", "a", "]"}], "]"}], " ", ".", " ", 
          RowBox[{"GG", "[", 
           RowBox[{"xx", "[", 
            RowBox[{"[", "a", "]"}], "]"}], "]"}]}], ",", 
         RowBox[{"{", 
          RowBox[{"a", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"CGv", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{
          RowBox[{"CGG", "[", 
           RowBox[{"xx", "[", 
            RowBox[{"[", "a", "]"}], "]"}], "]"}], " ", ".", " ", 
          RowBox[{"ConjugateTranspose", "[", 
           RowBox[{"gv", "[", 
            RowBox[{"[", "a", "]"}], "]"}], "]"}]}], ",", 
         RowBox[{"{", 
          RowBox[{"a", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"zzv", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{
           RowBox[{"{", "0", "}"}], ",", 
           RowBox[{"{", "0", "}"}]}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"a", ",", "1", ",", "5"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"b", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"czzv", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{
           RowBox[{"{", "0", "}"}], ",", 
           RowBox[{"{", "0", "}"}]}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"a", ",", "1", ",", "5"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"b", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"zzv", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "1"}], "]"}], "]"}], ",", 
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "2"}], "]"}], "]"}]}], "]"}], "]"}], "=", 
         RowBox[{"{", 
          RowBox[{
           RowBox[{"{", "1", "}"}], ",", 
           RowBox[{"{", 
            RowBox[{
             RowBox[{
              RowBox[{"zv", "[", 
               RowBox[{"[", 
                RowBox[{
                 RowBox[{"EE", "[", 
                  RowBox[{"[", 
                   RowBox[{"a", ",", "1"}], "]"}], "]"}], ",", 
                 RowBox[{"EE", "[", 
                  RowBox[{"[", 
                   RowBox[{"a", ",", "2"}], "]"}], "]"}]}], "]"}], "]"}], "[", 
              RowBox[{"[", 
               RowBox[{"2", ",", "1"}], "]"}], "]"}], "+", 
             RowBox[{"(", 
              RowBox[{
               RowBox[{"zz", "[", 
                RowBox[{"[", 
                 RowBox[{"a", ",", "1"}], "]"}], "]"}], "+", 
               RowBox[{"I", "*", 
                RowBox[{"zz", "[", 
                 RowBox[{"[", 
                  RowBox[{"a", ",", "2"}], "]"}], "]"}]}]}], ")"}]}], "}"}]}],
           "}"}]}], ",", 
        RowBox[{"{", 
         RowBox[{"a", ",", "1", ",", "10"}], "}"}]}], "]"}], ";", "\n", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"zzv", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "2"}], "]"}], "]"}], ",", 
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "1"}], "]"}], "]"}]}], "]"}], "]"}], "=", 
         RowBox[{"zzv", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "1"}], "]"}], "]"}], ",", 
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "2"}], "]"}], "]"}]}], "]"}], "]"}]}], ",", 
        RowBox[{"{", 
         RowBox[{"a", ",", "1", ",", "10"}], "}"}]}], "]"}], ";", "\n", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"czzv", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "1"}], "]"}], "]"}], ",", 
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "2"}], "]"}], "]"}]}], "]"}], "]"}], "=", 
         RowBox[{"{", 
          RowBox[{
           RowBox[{"{", "1", "}"}], ",", 
           RowBox[{"{", 
            RowBox[{
             RowBox[{"Conjugate", "[", 
              RowBox[{
               RowBox[{"zv", "[", 
                RowBox[{"[", 
                 RowBox[{
                  RowBox[{"EE", "[", 
                   RowBox[{"[", 
                    RowBox[{"a", ",", "1"}], "]"}], "]"}], ",", 
                  RowBox[{"EE", "[", 
                   RowBox[{"[", 
                    RowBox[{"a", ",", "2"}], "]"}], "]"}]}], "]"}], "]"}], 
               "[", 
               RowBox[{"[", 
                RowBox[{"2", ",", "1"}], "]"}], "]"}], "]"}], "+", 
             RowBox[{"(", 
              RowBox[{
               RowBox[{"zz", "[", 
                RowBox[{"[", 
                 RowBox[{"a", ",", "3"}], "]"}], "]"}], "+", 
               RowBox[{"I", "*", 
                RowBox[{"zz", "[", 
                 RowBox[{"[", 
                  RowBox[{"a", ",", "4"}], "]"}], "]"}]}]}], ")"}]}], "}"}]}],
           "}"}]}], ",", 
        RowBox[{"{", 
         RowBox[{"a", ",", "1", ",", "10"}], "}"}]}], "]"}], ";", "\n", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"czzv", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "2"}], "]"}], "]"}], ",", 
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "1"}], "]"}], "]"}]}], "]"}], "]"}], "=", 
         RowBox[{"czzv", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "1"}], "]"}], "]"}], ",", 
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "2"}], "]"}], "]"}]}], "]"}], "]"}]}], ",", 
        RowBox[{"{", 
         RowBox[{"a", ",", "1", ",", "10"}], "}"}]}], "]"}], ";", "\n", 
      RowBox[{"Zv", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{"x", "==", "y"}], ",", 
           RowBox[{"{", 
            RowBox[{"0", ",", "0"}], "}"}], ",", 
           RowBox[{
            RowBox[{"CGv", "[", 
             RowBox[{"[", "x", "]"}], "]"}], " ", ".", " ", 
            RowBox[{"zzv", "[", 
             RowBox[{"[", 
              RowBox[{"x", ",", "y"}], "]"}], "]"}]}]}], "]"}], ",", 
         RowBox[{"{", 
          RowBox[{"x", ",", "1", ",", "5"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"y", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"CZv", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{"x", "==", "y"}], ",", 
           RowBox[{"{", 
            RowBox[{"0", ",", "0"}], "}"}], ",", 
           RowBox[{
            RowBox[{"Transpose", "[", 
             RowBox[{"czzv", "[", 
              RowBox[{"[", 
               RowBox[{"x", ",", "y"}], "]"}], "]"}], "]"}], " ", ".", " ", 
            RowBox[{"Gv", "[", 
             RowBox[{"[", "x", "]"}], "]"}]}]}], "]"}], ",", 
         RowBox[{"{", 
          RowBox[{"x", ",", "1", ",", "5"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"y", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"Zv2", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{"x", "==", "y"}], ",", "1", ",", 
           RowBox[{
            RowBox[{"(", 
             RowBox[{
              RowBox[{"CZv", "[", 
               RowBox[{"[", 
                RowBox[{"x", ",", "y"}], "]"}], "]"}], " ", ".", " ", 
              RowBox[{"Zv", "[", 
               RowBox[{"[", 
                RowBox[{"x", ",", "y"}], "]"}], "]"}]}], ")"}], "[", 
            RowBox[{"[", 
             RowBox[{"1", ",", "1"}], "]"}], "]"}]}], "]"}], ",", 
         RowBox[{"{", 
          RowBox[{"x", ",", "1", ",", "5"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"y", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"XZ", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{"x", "==", "y"}], ",", "1", ",", 
           RowBox[{
            RowBox[{"(", 
             RowBox[{
              RowBox[{"ConjugateTranspose", "[", 
               RowBox[{"J", "[", 
                RowBox[{"xv", "[", 
                 RowBox[{"[", 
                  RowBox[{"x", ",", "y"}], "]"}], "]"}], "]"}], "]"}], " ", 
              ".", " ", 
              RowBox[{"Zv", "[", 
               RowBox[{"[", 
                RowBox[{"x", ",", "y"}], "]"}], "]"}]}], ")"}], "[", 
            RowBox[{"[", 
             RowBox[{"1", ",", "1"}], "]"}], "]"}]}], "]"}], ",", 
         RowBox[{"{", 
          RowBox[{"x", ",", "1", ",", "5"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"y", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"ZX", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{"x", "==", "y"}], ",", "1", ",", 
           RowBox[{
            RowBox[{"(", 
             RowBox[{
              RowBox[{"CZv", "[", 
               RowBox[{"[", 
                RowBox[{"x", ",", "y"}], "]"}], "]"}], " ", ".", " ", 
              RowBox[{"xv", "[", 
               RowBox[{"[", 
                RowBox[{"x", ",", "y"}], "]"}], "]"}]}], ")"}], "[", 
            RowBox[{"[", 
             RowBox[{"1", ",", "1"}], "]"}], "]"}]}], "]"}], ",", 
         RowBox[{"{", 
          RowBox[{"x", ",", "1", ",", "5"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"y", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"B", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{"x", "==", "y"}], ",", "0", ",", "\n", "\t\t", 
           RowBox[{"If", "[", 
            RowBox[{
             RowBox[{"x", "<", "y"}], ",", "\n", "\t\t", 
             RowBox[{"\[Gamma]", "*", 
              RowBox[{"sspin", "[", 
               RowBox[{"[", 
                RowBox[{"x", ",", "y"}], "]"}], "]"}], 
              RowBox[{
               RowBox[{"(", 
                RowBox[{
                 RowBox[{"(", 
                  RowBox[{
                   RowBox[{"CZv", "[", 
                    RowBox[{"[", 
                    RowBox[{"x", ",", "y"}], "]"}], "]"}], " ", ".", " ", 
                   RowBox[{"PauliMatrix", "[", "t", "]"}], " ", ".", " ", 
                   RowBox[{"xv", "[", 
                    RowBox[{"[", 
                    RowBox[{"x", ",", "y"}], "]"}], "]"}]}], ")"}], "[", 
                 RowBox[{"[", 
                  RowBox[{"1", ",", "1"}], "]"}], "]"}], ")"}], "/", 
               RowBox[{"(", 
                RowBox[{
                 RowBox[{"(", 
                  RowBox[{
                   RowBox[{"CZv", "[", 
                    RowBox[{"[", 
                    RowBox[{"x", ",", "y"}], "]"}], "]"}], " ", ".", " ", 
                   RowBox[{"xv", "[", 
                    RowBox[{"[", 
                    RowBox[{"x", ",", "y"}], "]"}], "]"}]}], ")"}], "[", 
                 RowBox[{"[", 
                  RowBox[{"1", ",", "1"}], "]"}], "]"}], ")"}]}]}], "\n", 
             "\t\t", ",", "\n", "\t\t", 
             RowBox[{
              RowBox[{"-", "\[Gamma]"}], "*", 
              RowBox[{"sspin", "[", 
               RowBox[{"[", 
                RowBox[{"x", ",", "y"}], "]"}], "]"}], 
              RowBox[{
               RowBox[{"(", 
                RowBox[{
                 RowBox[{"(", 
                  RowBox[{
                   RowBox[{"ConjugateTranspose", "[", 
                    RowBox[{"J", "[", 
                    RowBox[{"xv", "[", 
                    RowBox[{"[", 
                    RowBox[{"x", ",", "y"}], "]"}], "]"}], "]"}], "]"}], " ", 
                   ".", " ", 
                   RowBox[{"(", 
                    RowBox[{
                    RowBox[{"PauliMatrix", "[", "t", "]"}], " ", ".", " ", 
                    RowBox[{"Zv", "[", 
                    RowBox[{"[", 
                    RowBox[{"x", ",", "y"}], "]"}], "]"}]}], ")"}]}], ")"}], 
                 "[", 
                 RowBox[{"[", 
                  RowBox[{"1", ",", "1"}], "]"}], "]"}], ")"}], "/", 
               RowBox[{"(", 
                RowBox[{
                 RowBox[{"(", 
                  RowBox[{
                   RowBox[{"ConjugateTranspose", "[", 
                    RowBox[{"J", "[", 
                    RowBox[{"xv", "[", 
                    RowBox[{"[", 
                    RowBox[{"x", ",", "y"}], "]"}], "]"}], "]"}], "]"}], " ", 
                   ".", " ", 
                   RowBox[{"Zv", "[", 
                    RowBox[{"[", 
                    RowBox[{"x", ",", "y"}], "]"}], "]"}]}], ")"}], "[", 
                 RowBox[{"[", 
                  RowBox[{"1", ",", "1"}], "]"}], "]"}], ")"}]}]}]}], "\n", 
            "\t\t", "]"}]}], "\n", "\t\t", "]"}], ",", 
         RowBox[{"{", 
          RowBox[{"t", ",", "1", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"x", ",", "1", ",", "5"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"y", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"A", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{"Total", "[", 
          RowBox[{"Table", "[", 
           RowBox[{
            RowBox[{
             RowBox[{"B", "[", 
              RowBox[{"[", 
               RowBox[{"x", ",", "a", ",", "b"}], "]"}], "]"}], "*", 
             RowBox[{"B", "[", 
              RowBox[{"[", 
               RowBox[{"x", ",", "a", ",", "c"}], "]"}], "]"}]}], ",", 
            RowBox[{"{", 
             RowBox[{"x", ",", "1", ",", "3"}], "}"}]}], "]"}], "]"}], ",", 
         RowBox[{"{", 
          RowBox[{"a", ",", "1", ",", "5"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"b", ",", "1", ",", "5"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"c", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"ZM", "=", 
       RowBox[{"Product", "[", 
        RowBox[{
         RowBox[{"1", "/", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{"Zv2", "[", 
             RowBox[{"[", 
              RowBox[{
               RowBox[{"EE", "[", 
                RowBox[{"[", 
                 RowBox[{"t", ",", "1"}], "]"}], "]"}], ",", 
               RowBox[{"EE", "[", 
                RowBox[{"[", 
                 RowBox[{"t", ",", "2"}], "]"}], "]"}]}], "]"}], "]"}], "*", 
            RowBox[{"Zv2", "[", 
             RowBox[{"[", 
              RowBox[{
               RowBox[{"EE", "[", 
                RowBox[{"[", 
                 RowBox[{"t", ",", "2"}], "]"}], "]"}], ",", 
               RowBox[{"EE", "[", 
                RowBox[{"[", 
                 RowBox[{"t", ",", "1"}], "]"}], "]"}]}], "]"}], "]"}]}], 
           ")"}]}], ",", 
         RowBox[{"{", 
          RowBox[{"t", ",", "1", ",", "10"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"GM", "=", 
       RowBox[{"Product", "[", 
        RowBox[{
         RowBox[{"1", "/", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"CGG", "[", 
              RowBox[{"xx", "[", 
               RowBox[{"[", "a", "]"}], "]"}], "]"}], "[", 
             RowBox[{"[", 
              RowBox[{"1", ",", "1"}], "]"}], "]"}], "*", 
            RowBox[{
             RowBox[{"GG", "[", 
              RowBox[{"xx", "[", 
               RowBox[{"[", "a", "]"}], "]"}], "]"}], "[", 
             RowBox[{"[", 
              RowBox[{"1", ",", "1"}], "]"}], "]"}]}], ")"}]}], ",", 
         RowBox[{"{", 
          RowBox[{"a", ",", "1", ",", "4"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"CCC", "=", 
       RowBox[{
        RowBox[{
         RowBox[{"(", 
          RowBox[{"1", "/", 
           RowBox[{"(", 
            RowBox[{
             RowBox[{"2", "^", "7"}], "*", 
             RowBox[{"Pi", "^", "4"}]}], ")"}]}], ")"}], "^", "4"}], "*", 
        RowBox[{
         RowBox[{"(", 
          RowBox[{
           RowBox[{"(", 
            RowBox[{"Sqrt", "[", 
             RowBox[{"1", "+", 
              RowBox[{"I", "*", "\[Gamma]"}]}], "]"}], ")"}], "/", 
           RowBox[{"(", 
            RowBox[{"Pi", "*", 
             RowBox[{"Sqrt", "[", 
              RowBox[{"1", "-", 
               RowBox[{"I", "*", "\[Gamma]"}]}], "]"}]}], ")"}]}], ")"}], "^",
          "10"}]}]}], ";", "\n", 
      RowBox[{"{", 
       RowBox[{"A", ",", 
        RowBox[{
         RowBox[{"Product", "[", 
          RowBox[{
           RowBox[{"(", 
            RowBox[{
             RowBox[{"2", "*", 
              RowBox[{"spin", "[", 
               RowBox[{"[", 
                RowBox[{
                 RowBox[{"EE", "[", 
                  RowBox[{"[", 
                   RowBox[{"t", ",", "1"}], "]"}], "]"}], ",", 
                 RowBox[{"EE", "[", 
                  RowBox[{"[", 
                   RowBox[{"t", ",", "2"}], "]"}], "]"}]}], "]"}], "]"}]}], 
             "+", "1"}], ")"}], ",", 
           RowBox[{"{", 
            RowBox[{"t", ",", "1", ",", "10"}], "}"}]}], "]"}], "*", "ZM", 
         "*", "GM"}], ",", "CCC", ",", "B"}], "}"}]}]}], "\n", "]"}]}], "\n", 
  "\n"}]], "Code",
 CellLabel->
  "In[113]:=",ExpressionUUID->"7a4e72f8-ee12-4a29-abdc-71f696698122"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"Action4", "[", "aax_", "]"}], ":=", 
   RowBox[{"Block", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
      "aa", ",", "xx", ",", "zz", ",", "cspin", ",", "cspin1", ",", "spin", 
       ",", "spin1", ",", "spin2", ",", "CGv", ",", "Gv", ",", "zzv", ",", 
       "czzv", ",", "Zv", ",", "CZv", ",", "Zv2", ",", "XZ", ",", "ZX", ",", 
       "A", ",", "B", ",", "SC", ",", "S", ",", "C1", ",", "C2", ",", "ZX1", 
       ",", "XZ1"}], "}"}], ",", "\n", 
     RowBox[{
      RowBox[{"aa", "=", "aax"}], ";", "\n", 
      RowBox[{"zz", "=", 
       RowBox[{"Table", "[", 
        RowBox[{"0", ",", 
         RowBox[{"{", 
          RowBox[{"c", ",", "1", ",", "10"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"a", ",", "1", ",", "4"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"xx", "=", 
       RowBox[{"Table", "[", 
        RowBox[{"0", ",", 
         RowBox[{"{", 
          RowBox[{"c", ",", "1", ",", "5"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"a", ",", "1", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"b", ",", "1", ",", "3"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"spin", "=", 
       RowBox[{"Table", "[", 
        RowBox[{"0", ",", 
         RowBox[{"{", 
          RowBox[{"a", ",", "1", ",", "10"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"cspin", "=", 
       RowBox[{"Table", "[", 
        RowBox[{"0", ",", 
         RowBox[{"{", 
          RowBox[{"a", ",", "1", ",", "10"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"xx", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"Index", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "1"}], "]"}], "]"}], ",", 
            RowBox[{"Index", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "2"}], "]"}], "]"}], ",", 
            RowBox[{"Index", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "3"}], "]"}], "]"}]}], "]"}], "]"}], "=", 
         RowBox[{"aa", "[", 
          RowBox[{"[", "a", "]"}], "]"}]}], ",", 
        RowBox[{"{", 
         RowBox[{"a", ",", "1", ",", "24"}], "}"}]}], "]"}], ";", "\n", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"xx", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"Index", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "1"}], "]"}], "]"}], ",", 
            RowBox[{"Index", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "2"}], "]"}], "]"}], ",", 
            RowBox[{"Index", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "3"}], "]"}], "]"}]}], "]"}], "]"}], "=", 
         RowBox[{"aa", "[", 
          RowBox[{"[", "a", "]"}], "]"}]}], ",", 
        RowBox[{"{", 
         RowBox[{"a", ",", "55", ",", 
          RowBox[{"55", "+", "23"}]}], "}"}]}], "]"}], ";", "\n", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"zz", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"Index", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "1"}], "]"}], "]"}], ",", 
            RowBox[{"Index", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "2"}], "]"}], "]"}]}], "]"}], "]"}], "=", 
         RowBox[{"aa", "[", 
          RowBox[{"[", "a", "]"}], "]"}]}], ",", 
        RowBox[{"{", 
         RowBox[{"a", ",", "25", ",", "44"}], "}"}]}], "]"}], ";", "\n", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"spin", "[", 
          RowBox[{"[", 
           RowBox[{"a", "-", "44"}], "]"}], "]"}], "=", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{
            RowBox[{"aa", "[", 
             RowBox[{"[", "a", "]"}], "]"}], "+", 
            RowBox[{"I", "*", 
             RowBox[{"aa", "[", 
              RowBox[{"[", 
               RowBox[{"a", "+", "54"}], "]"}], "]"}]}]}], ")"}], "+", 
          RowBox[{"arv", "[", 
           RowBox[{"[", 
            RowBox[{
             RowBox[{"EE", "[", 
              RowBox[{"[", 
               RowBox[{
                RowBox[{"a", "-", "44"}], ",", "1"}], "]"}], "]"}], ",", 
             RowBox[{"EE", "[", 
              RowBox[{"[", 
               RowBox[{
                RowBox[{"a", "-", "44"}], ",", "2"}], "]"}], "]"}]}], "]"}], 
           "]"}]}]}], ",", 
        RowBox[{"{", 
         RowBox[{"a", ",", "45", ",", "54"}], "}"}]}], "]"}], ";", "\n", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"cspin", "[", 
          RowBox[{"[", 
           RowBox[{"a", "-", "44"}], "]"}], "]"}], "=", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{
            RowBox[{"aa", "[", 
             RowBox[{"[", "a", "]"}], "]"}], "-", 
            RowBox[{"I", "*", 
             RowBox[{"aa", "[", 
              RowBox[{"[", 
               RowBox[{"a", "+", "54"}], "]"}], "]"}]}]}], ")"}], "+", 
          RowBox[{"arv", "[", 
           RowBox[{"[", 
            RowBox[{
             RowBox[{"EE", "[", 
              RowBox[{"[", 
               RowBox[{
                RowBox[{"a", "-", "44"}], ",", "1"}], "]"}], "]"}], ",", 
             RowBox[{"EE", "[", 
              RowBox[{"[", 
               RowBox[{
                RowBox[{"a", "-", "44"}], ",", "2"}], "]"}], "]"}]}], "]"}], 
           "]"}]}]}], ",", 
        RowBox[{"{", 
         RowBox[{"a", ",", "45", ",", "54"}], "}"}]}], "]"}], ";", "\n", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"zz", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"Index", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "1"}], "]"}], "]"}], ",", 
            RowBox[{"Index", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "2"}], "]"}], "]"}]}], "]"}], "]"}], "=", 
         RowBox[{"aa", "[", 
          RowBox[{"[", "a", "]"}], "]"}]}], ",", 
        RowBox[{"{", 
         RowBox[{"a", ",", "79", ",", 
          RowBox[{"79", "+", "19"}]}], "}"}]}], "]"}], ";", "\n", 
      RowBox[{"Gv", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{
          RowBox[{"gv", "[", 
           RowBox[{"[", "a", "]"}], "]"}], " ", ".", " ", 
          RowBox[{"GG", "[", 
           RowBox[{"xx", "[", 
            RowBox[{"[", "a", "]"}], "]"}], "]"}]}], ",", 
         RowBox[{"{", 
          RowBox[{"a", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"CGv", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{
          RowBox[{"CGG", "[", 
           RowBox[{"xx", "[", 
            RowBox[{"[", "a", "]"}], "]"}], "]"}], " ", ".", " ", 
          RowBox[{"ConjugateTranspose", "[", 
           RowBox[{"gv", "[", 
            RowBox[{"[", "a", "]"}], "]"}], "]"}]}], ",", 
         RowBox[{"{", 
          RowBox[{"a", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"zzv", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{
           RowBox[{"{", "0", "}"}], ",", 
           RowBox[{"{", "0", "}"}]}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"a", ",", "1", ",", "5"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"b", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"czzv", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{
           RowBox[{"{", "0", "}"}], ",", 
           RowBox[{"{", "0", "}"}]}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"a", ",", "1", ",", "5"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"b", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"zzv", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "1"}], "]"}], "]"}], ",", 
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "2"}], "]"}], "]"}]}], "]"}], "]"}], "=", 
         RowBox[{"{", 
          RowBox[{
           RowBox[{"{", "1", "}"}], ",", 
           RowBox[{"{", 
            RowBox[{
             RowBox[{
              RowBox[{"zv", "[", 
               RowBox[{"[", 
                RowBox[{
                 RowBox[{"EE", "[", 
                  RowBox[{"[", 
                   RowBox[{"a", ",", "1"}], "]"}], "]"}], ",", 
                 RowBox[{"EE", "[", 
                  RowBox[{"[", 
                   RowBox[{"a", ",", "2"}], "]"}], "]"}]}], "]"}], "]"}], "[", 
              RowBox[{"[", 
               RowBox[{"2", ",", "1"}], "]"}], "]"}], "+", 
             RowBox[{"(", 
              RowBox[{
               RowBox[{"zz", "[", 
                RowBox[{"[", 
                 RowBox[{"a", ",", "1"}], "]"}], "]"}], "+", 
               RowBox[{"I", "*", 
                RowBox[{"zz", "[", 
                 RowBox[{"[", 
                  RowBox[{"a", ",", "2"}], "]"}], "]"}]}]}], ")"}]}], "}"}]}],
           "}"}]}], ",", 
        RowBox[{"{", 
         RowBox[{"a", ",", "1", ",", "10"}], "}"}]}], "]"}], ";", "\n", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"zzv", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "2"}], "]"}], "]"}], ",", 
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "1"}], "]"}], "]"}]}], "]"}], "]"}], "=", 
         RowBox[{"zzv", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "1"}], "]"}], "]"}], ",", 
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "2"}], "]"}], "]"}]}], "]"}], "]"}]}], ",", 
        RowBox[{"{", 
         RowBox[{"a", ",", "1", ",", "10"}], "}"}]}], "]"}], ";", "\n", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"czzv", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "1"}], "]"}], "]"}], ",", 
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "2"}], "]"}], "]"}]}], "]"}], "]"}], "=", 
         RowBox[{"{", 
          RowBox[{
           RowBox[{"{", "1", "}"}], ",", 
           RowBox[{"{", 
            RowBox[{
             RowBox[{"Conjugate", "[", 
              RowBox[{
               RowBox[{"zv", "[", 
                RowBox[{"[", 
                 RowBox[{
                  RowBox[{"EE", "[", 
                   RowBox[{"[", 
                    RowBox[{"a", ",", "1"}], "]"}], "]"}], ",", 
                  RowBox[{"EE", "[", 
                   RowBox[{"[", 
                    RowBox[{"a", ",", "2"}], "]"}], "]"}]}], "]"}], "]"}], 
               "[", 
               RowBox[{"[", 
                RowBox[{"2", ",", "1"}], "]"}], "]"}], "]"}], "+", 
             RowBox[{"(", 
              RowBox[{
               RowBox[{"zz", "[", 
                RowBox[{"[", 
                 RowBox[{"a", ",", "3"}], "]"}], "]"}], "+", 
               RowBox[{"I", "*", 
                RowBox[{"zz", "[", 
                 RowBox[{"[", 
                  RowBox[{"a", ",", "4"}], "]"}], "]"}]}]}], ")"}]}], "}"}]}],
           "}"}]}], ",", 
        RowBox[{"{", 
         RowBox[{"a", ",", "1", ",", "10"}], "}"}]}], "]"}], ";", "\n", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"czzv", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "2"}], "]"}], "]"}], ",", 
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "1"}], "]"}], "]"}]}], "]"}], "]"}], "=", 
         RowBox[{"czzv", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "1"}], "]"}], "]"}], ",", 
            RowBox[{"EE", "[", 
             RowBox[{"[", 
              RowBox[{"a", ",", "2"}], "]"}], "]"}]}], "]"}], "]"}]}], ",", 
        RowBox[{"{", 
         RowBox[{"a", ",", "1", ",", "10"}], "}"}]}], "]"}], ";", "\n", 
      RowBox[{"Zv", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{"x", "==", "y"}], ",", 
           RowBox[{"{", 
            RowBox[{"0", ",", "0"}], "}"}], ",", 
           RowBox[{
            RowBox[{"CGv", "[", 
             RowBox[{"[", "x", "]"}], "]"}], " ", ".", " ", 
            RowBox[{"zzv", "[", 
             RowBox[{"[", 
              RowBox[{"x", ",", "y"}], "]"}], "]"}]}]}], "]"}], ",", 
         RowBox[{"{", 
          RowBox[{"x", ",", "1", ",", "5"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"y", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"CZv", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{"x", "==", "y"}], ",", 
           RowBox[{"{", 
            RowBox[{"0", ",", "0"}], "}"}], ",", 
           RowBox[{
            RowBox[{"Transpose", "[", 
             RowBox[{"czzv", "[", 
              RowBox[{"[", 
               RowBox[{"x", ",", "y"}], "]"}], "]"}], "]"}], " ", ".", " ", 
            RowBox[{"Gv", "[", 
             RowBox[{"[", "x", "]"}], "]"}]}]}], "]"}], ",", 
         RowBox[{"{", 
          RowBox[{"x", ",", "1", ",", "5"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"y", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"Zv2", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{"x", "==", "y"}], ",", "1", ",", 
           RowBox[{
            RowBox[{"(", 
             RowBox[{
              RowBox[{"CZv", "[", 
               RowBox[{"[", 
                RowBox[{"x", ",", "y"}], "]"}], "]"}], " ", ".", " ", 
              RowBox[{"Zv", "[", 
               RowBox[{"[", 
                RowBox[{"x", ",", "y"}], "]"}], "]"}]}], ")"}], "[", 
            RowBox[{"[", 
             RowBox[{"1", ",", "1"}], "]"}], "]"}]}], "]"}], ",", 
         RowBox[{"{", 
          RowBox[{"x", ",", "1", ",", "5"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"y", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"XZ", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{"x", "==", "y"}], ",", "1", ",", 
           RowBox[{
            RowBox[{"(", 
             RowBox[{
              RowBox[{"ConjugateTranspose", "[", 
               RowBox[{"J", "[", 
                RowBox[{"xv", "[", 
                 RowBox[{"[", 
                  RowBox[{"x", ",", "y"}], "]"}], "]"}], "]"}], "]"}], " ", 
              ".", " ", 
              RowBox[{"Zv", "[", 
               RowBox[{"[", 
                RowBox[{"x", ",", "y"}], "]"}], "]"}]}], ")"}], "[", 
            RowBox[{"[", 
             RowBox[{"1", ",", "1"}], "]"}], "]"}]}], "]"}], ",", 
         RowBox[{"{", 
          RowBox[{"x", ",", "1", ",", "5"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"y", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"ZX", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{"x", "==", "y"}], ",", "1", ",", 
           RowBox[{
            RowBox[{"(", 
             RowBox[{
              RowBox[{"CZv", "[", 
               RowBox[{"[", 
                RowBox[{"x", ",", "y"}], "]"}], "]"}], " ", ".", " ", 
              RowBox[{"xv", "[", 
               RowBox[{"[", 
                RowBox[{"x", ",", "y"}], "]"}], "]"}]}], ")"}], "[", 
            RowBox[{"[", 
             RowBox[{"1", ",", "1"}], "]"}], "]"}]}], "]"}], ",", 
         RowBox[{"{", 
          RowBox[{"x", ",", "1", ",", "5"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"y", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"XZ1", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{"x", "==", "y"}], ",", "1", ",", 
           RowBox[{"(", 
            RowBox[{"ConjugateTranspose", "[", 
             RowBox[{"J", "[", 
              RowBox[{"xv", "[", 
               RowBox[{"[", 
                RowBox[{"x", ",", "y"}], "]"}], "]"}], "]"}], "]"}], ")"}]}], 
          "]"}], ",", 
         RowBox[{"{", 
          RowBox[{"x", ",", "1", ",", "5"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"y", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"ZX1", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{"x", "==", "y"}], ",", "1", ",", 
           RowBox[{"(", 
            RowBox[{"xv", "[", 
             RowBox[{"[", 
              RowBox[{"x", ",", "y"}], "]"}], "]"}], ")"}]}], "]"}], ",", 
         RowBox[{"{", 
          RowBox[{"x", ",", "1", ",", "5"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"y", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"A", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{
          RowBox[{"ZX", "[", 
           RowBox[{"[", 
            RowBox[{"x", ",", "y"}], "]"}], "]"}], "*", 
          RowBox[{"XZ", "[", 
           RowBox[{"[", 
            RowBox[{"y", ",", "x"}], "]"}], "]"}]}], ",", 
         RowBox[{"{", 
          RowBox[{"x", ",", "1", ",", "5"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"y", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"B", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{
          RowBox[{"Zv2", "[", 
           RowBox[{"[", 
            RowBox[{"y", ",", "x"}], "]"}], "]"}], "/", 
          RowBox[{"Zv2", "[", 
           RowBox[{"[", 
            RowBox[{"x", ",", "y"}], "]"}], "]"}]}], ",", 
         RowBox[{"{", 
          RowBox[{"x", ",", "1", ",", "5"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"y", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"{", 
       RowBox[{
       "A", ",", "B", ",", "spin", ",", "cspin", ",", "xx", ",", "zz", ",", 
        "Gv", ",", "CGv", ",", "Zv", ",", "CZv", ",", "XZ", ",", "ZX", ",", 
        "XZ1", ",", "ZX1", ",", "zzv", ",", "czzv"}], "}"}]}]}], "\n", 
    "]"}]}], "\n"}]], "Code",
 CellLabel->
  "In[114]:=",ExpressionUUID->"6fc0f921-9681-4435-abad-4f1d99f6cbe2"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"DerSym", "[", 
    RowBox[{"x_", ",", "aa_"}], "]"}], ":=", 
   RowBox[{"Block", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
       RowBox[{"aa1", "=", "aa"}], ",", "cmc"}], "}"}], ",", "\n", 
     RowBox[{
      RowBox[{
       RowBox[{"aa1", "[", 
        RowBox[{"[", "x", "]"}], "]"}], "=", 
       RowBox[{"SetPrecision", "[", 
        RowBox[{"cmc", ",", "er"}], "]"}]}], ";", "\n", 
      RowBox[{
       RowBox[{"D", "[", 
        RowBox[{
         RowBox[{"Action2", "[", "aa1", "]"}], ",", "cmc"}], "]"}], "/.", 
       RowBox[{"cmc", "->", 
        RowBox[{"SetPrecision", "[", 
         RowBox[{
          RowBox[{"aa", "[", 
           RowBox[{"[", "x", "]"}], "]"}], ",", "er"}], "]"}]}]}]}]}], "\n", 
    "]"}]}], "\n"}]], "Code",
 CellLabel->
  "In[115]:=",ExpressionUUID->"8d95355f-479e-4c06-ae1a-e0a113660173"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"DerSym2", "[", 
    RowBox[{"x_", ",", "y_", ",", "aa_"}], "]"}], ":=", 
   RowBox[{"Block", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
       RowBox[{"aa1", "=", "aa"}], ",", "cmc1", ",", "cmc2", ",", "re", ",", 
       "res"}], "}"}], ",", "\n", 
     RowBox[{
      RowBox[{"If", "[", 
       RowBox[{
        RowBox[{"x", "==", "y"}], ",", 
        RowBox[{"{", 
         RowBox[{
          RowBox[{
           RowBox[{"aa1", "[", 
            RowBox[{"[", "x", "]"}], "]"}], "=", "cmc1"}], ";", 
          RowBox[{"re", "=", 
           RowBox[{
            RowBox[{"D", "[", 
             RowBox[{
              RowBox[{"D", "[", 
               RowBox[{
                RowBox[{"Action2", "[", "aa1", "]"}], ",", "cmc1"}], "]"}], 
              ",", "cmc1"}], "]"}], "/.", 
            RowBox[{"cmc1", "->", 
             RowBox[{"aa", "[", 
              RowBox[{"[", "x", "]"}], "]"}]}]}]}]}], "}"}], ",", 
        RowBox[{"{", 
         RowBox[{
          RowBox[{
           RowBox[{"aa1", "[", 
            RowBox[{"[", "x", "]"}], "]"}], "=", "cmc1"}], ";", 
          RowBox[{
           RowBox[{"aa1", "[", 
            RowBox[{"[", "y", "]"}], "]"}], "=", "cmc2"}], ";", 
          RowBox[{"re", "=", 
           RowBox[{"D", "[", 
            RowBox[{
             RowBox[{"D", "[", 
              RowBox[{
               RowBox[{"Action2", "[", "aa1", "]"}], ",", "cmc1"}], "]"}], 
             ",", "cmc2"}], "]"}]}], ";"}], "}"}]}], "]"}], ";", "\n", "\t", 
      RowBox[{"re", "/.", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"cmc1", "->", 
          RowBox[{"aa", "[", 
           RowBox[{"[", "x", "]"}], "]"}]}], ",", 
         RowBox[{"cmc2", "->", 
          RowBox[{"aa", "[", 
           RowBox[{"[", "y", "]"}], "]"}]}]}], "}"}]}]}]}], "\n", "]"}]}], 
  "\n"}]], "Code",
 CellLabel->
  "In[116]:=",ExpressionUUID->"ff003fc2-f871-4367-8e06-1d3c76d6bc40"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"If", "[", 
   RowBox[{
    RowBox[{"FileExistsQ", "[", "tempfile6", "]"}], ",", 
    RowBox[{"{", 
     RowBox[{
      RowBox[{"Get", "[", "tempfile6", "]"}], ";"}], "}"}], ",", 
    RowBox[{"{", "\n", 
     RowBox[{
      RowBox[{
       RowBox[{
        RowBox[{"AZ", "=", 
         RowBox[{"Table", "[", 
          RowBox[{
           RowBox[{"ToExpression", "[", 
            RowBox[{"\"\<X\>\"", "<>", 
             RowBox[{"ToString", "[", "x", "]"}]}], "]"}], ",", 
           RowBox[{"{", 
            RowBox[{"x", ",", "1", ",", "108"}], "}"}]}], "]"}]}], ";", "\n", 
        RowBox[{
         RowBox[{"F1", "[", "ppp_", "]"}], ":=", 
         RowBox[{
          RowBox[{"Flatten", "[", 
           RowBox[{"{", 
            RowBox[{
             RowBox[{"-", 
              RowBox[{"Re", "[", 
               RowBox[{"Table", "[", 
                RowBox[{
                 RowBox[{"D", "[", 
                  RowBox[{
                   RowBox[{"Action2", "[", "AZ", "]"}], ",", 
                   RowBox[{"AZ", "[", 
                    RowBox[{"[", "x", "]"}], "]"}]}], "]"}], ",", 
                 RowBox[{"{", 
                  RowBox[{"x", ",", "1", ",", "54"}], "}"}]}], "]"}], "]"}]}],
              ",", 
             RowBox[{"Im", "[", 
              RowBox[{"Table", "[", 
               RowBox[{
                RowBox[{"D", "[", 
                 RowBox[{
                  RowBox[{"Action2", "[", "AZ", "]"}], ",", 
                  RowBox[{"AZ", "[", 
                   RowBox[{"[", "x", "]"}], "]"}]}], "]"}], ",", 
                RowBox[{"{", 
                 RowBox[{"x", ",", "1", ",", "54"}], "}"}]}], "]"}], "]"}]}], 
            "}"}], "]"}], "/.", 
          RowBox[{"Table", "[", 
           RowBox[{
            RowBox[{
             RowBox[{"AZ", "[", 
              RowBox[{"[", "a", "]"}], "]"}], "->", 
             RowBox[{"ppp", "[", 
              RowBox[{"[", "a", "]"}], "]"}]}], ",", 
            RowBox[{"{", 
             RowBox[{"a", ",", "1", ",", "108"}], "}"}]}], "]"}]}]}], ";", 
        "\n", 
        RowBox[{
         RowBox[{"F2", "[", "ppp_", "]"}], ":=", 
         RowBox[{
          RowBox[{"Table", "[", 
           RowBox[{
            RowBox[{"D", "[", 
             RowBox[{
              RowBox[{"D", "[", 
               RowBox[{
                RowBox[{"Action2", "[", "AZ", "]"}], ",", 
                RowBox[{"AZ", "[", 
                 RowBox[{"[", "x", "]"}], "]"}]}], "]"}], ",", 
              RowBox[{"AZ", "[", 
               RowBox[{"[", "y", "]"}], "]"}]}], "]"}], ",", 
            RowBox[{"{", 
             RowBox[{"x", ",", "1", ",", "54"}], "}"}], ",", 
            RowBox[{"{", 
             RowBox[{"y", ",", "1", ",", "54"}], "}"}]}], "]"}], "/.", 
          RowBox[{"Table", "[", 
           RowBox[{
            RowBox[{
             RowBox[{"AZ", "[", 
              RowBox[{"[", "a", "]"}], "]"}], "->", 
             RowBox[{"ppp", "[", 
              RowBox[{"[", "a", "]"}], "]"}]}], ",", 
            RowBox[{"{", 
             RowBox[{"a", ",", "1", ",", "108"}], "}"}]}], "]"}]}]}], ";", 
        "\n", 
        RowBox[{
         RowBox[{"F3", "[", "ppp_", "]"}], ":=", 
         RowBox[{
          RowBox[{"\[Lambda]", "*", 
           RowBox[{"Action2", "[", "AZ", "]"}]}], "/.", 
          RowBox[{"Table", "[", 
           RowBox[{
            RowBox[{
             RowBox[{"AZ", "[", 
              RowBox[{"[", "a", "]"}], "]"}], "->", 
             RowBox[{"ppp", "[", 
              RowBox[{"[", "a", "]"}], "]"}]}], ",", 
            RowBox[{"{", 
             RowBox[{"a", ",", "1", ",", "108"}], "}"}]}], "]"}]}]}], ";", 
        "\n", 
        RowBox[{
         RowBox[{"P4", "[", "ppp_", "]"}], ":=", 
         RowBox[{
          RowBox[{"Action3", "[", "ppp", "]"}], "[", 
          RowBox[{"[", "1", "]"}], "]"}]}], ";", "\n", 
        RowBox[{
         RowBox[{"P5", "[", "ppp_", "]"}], ":=", 
         RowBox[{"TensorProduct", "[", 
          RowBox[{
           RowBox[{
            RowBox[{"Action3", "[", "ppp", "]"}], "[", 
            RowBox[{"[", "1", "]"}], "]"}], ",", 
           RowBox[{
            RowBox[{"Action3", "[", "ppp", "]"}], "[", 
            RowBox[{"[", "1", "]"}], "]"}]}], "]"}]}], ";", "\n", 
        RowBox[{
         RowBox[{"P6", "[", "ppp_", "]"}], ":=", 
         RowBox[{
          RowBox[{"Action3", "[", "ppp", "]"}], "[", 
          RowBox[{"[", "2", "]"}], "]"}]}], ";", "\n", 
        RowBox[{
         RowBox[{"F7", "[", "ppp_", "]"}], ":=", 
         RowBox[{
          RowBox[{"Table", "[", 
           RowBox[{
            RowBox[{"D", "[", 
             RowBox[{
              RowBox[{"Action2", "[", "AZ", "]"}], ",", 
              RowBox[{"AZ", "[", 
               RowBox[{"[", "x", "]"}], "]"}]}], "]"}], ",", 
            RowBox[{"{", 
             RowBox[{"x", ",", "1", ",", "54"}], "}"}]}], "]"}], "/.", 
          RowBox[{"Table", "[", 
           RowBox[{
            RowBox[{
             RowBox[{"AZ", "[", 
              RowBox[{"[", "a", "]"}], "]"}], "->", 
             RowBox[{"ppp", "[", 
              RowBox[{"[", "a", "]"}], "]"}]}], ",", 
            RowBox[{"{", 
             RowBox[{"a", ",", "1", ",", "108"}], "}"}]}], "]"}]}]}], ";", 
        "\n", 
        RowBox[{"P1", "=", 
         RowBox[{
          RowBox[{"Compile", "[", 
           RowBox[{
            RowBox[{"{", 
             RowBox[{"{", 
              RowBox[{"ppp", ",", "_Real", ",", "1"}], "}"}], "}"}], ",", 
            RowBox[{"Evaluate", "[", 
             RowBox[{"F1", "[", "ppp", "]"}], "]"}], ",", 
            RowBox[{"RuntimeAttributes", "->", 
             RowBox[{"{", "Listable", "}"}]}], ",", 
            RowBox[{"Parallelization", "->", "True"}], ",", 
            RowBox[{"CompilationTarget", "->", "\"\<C\>\""}]}], "]"}], "//", 
          "Quiet"}]}], ";", "\n", 
        RowBox[{"P2", "=", 
         RowBox[{
          RowBox[{"Compile", "[", 
           RowBox[{
            RowBox[{"{", 
             RowBox[{"{", 
              RowBox[{"ppp", ",", "_Real", ",", "1"}], "}"}], "}"}], ",", 
            RowBox[{"Evaluate", "[", 
             RowBox[{"F2", "[", "ppp", "]"}], "]"}], ",", 
            RowBox[{"RuntimeAttributes", "->", 
             RowBox[{"{", "Listable", "}"}]}], ",", 
            RowBox[{"Parallelization", "->", "True"}], ",", 
            RowBox[{"CompilationTarget", "->", "\"\<C\>\""}]}], "]"}], "//", 
          "Quiet"}]}], ";", "\n", 
        RowBox[{"P3", "=", 
         RowBox[{
          RowBox[{"Compile", "[", 
           RowBox[{
            RowBox[{"{", 
             RowBox[{"{", 
              RowBox[{"ppp", ",", "_Real", ",", "1"}], "}"}], "}"}], ",", 
            RowBox[{"Evaluate", "[", 
             RowBox[{"F3", "[", "ppp", "]"}], "]"}], ",", 
            RowBox[{"RuntimeAttributes", "->", 
             RowBox[{"{", "Listable", "}"}]}], ",", 
            RowBox[{"Parallelization", "->", "True"}], ",", 
            RowBox[{"CompilationTarget", "->", "\"\<C\>\""}]}], "]"}], "//", 
          "Quiet"}]}], ";", "\n", 
        RowBox[{"P7", "=", 
         RowBox[{
          RowBox[{"Compile", "[", 
           RowBox[{
            RowBox[{"{", 
             RowBox[{"{", 
              RowBox[{"ppp", ",", "_Real", ",", "1"}], "}"}], "}"}], ",", 
            RowBox[{"Evaluate", "[", 
             RowBox[{"F7", "[", "ppp", "]"}], "]"}], ",", 
            RowBox[{"RuntimeAttributes", "->", 
             RowBox[{"{", "Listable", "}"}]}], ",", 
            RowBox[{"Parallelization", "->", "True"}], ",", 
            RowBox[{"CompilationTarget", "->", "\"\<C\>\""}]}], "]"}], "//", 
          "Quiet"}]}], ";", "\n", 
        RowBox[{"DumpSave", "[", 
         RowBox[{"tempfile6", ",", 
          RowBox[{"{", 
           RowBox[{
           "P1", ",", "P2", ",", "P3", ",", "P4", ",", "P5", ",", "P6", ",", 
            "P7"}], "}"}]}], "]"}], ";"}], "//", "Quite"}], ";"}], "\n", 
     "}"}]}], "]"}], "\n", "\n", "\n"}]], "Code",
 CellLabel->
  "In[117]:=",ExpressionUUID->"3ad259f5-0ad0-4c8a-ab05-d84385f4d588"],

Cell[BoxData[
 RowBox[{"{", "Null", "}"}]], "Output",
 CellChangeTimes->{3.86530678231376*^9, 3.8653068137669463`*^9},
 CellLabel->
  "Out[117]=",ExpressionUUID->"7a6df25d-e9dc-4d7c-a4ac-04c6ed17e2c0"]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["SA Evolution", "Subtitle",
 CellChangeTimes->{{3.8653060116273203`*^9, 
  3.865306017107519*^9}},ExpressionUUID->"d4fa18a4-0596-47fb-90d1-\
353757a6c60d"],

Cell[BoxData[
 RowBox[{
  RowBox[{"FT", "[", "p_", "]"}], ":=", 
  RowBox[{"Block", "[", 
   RowBox[{
    RowBox[{"{", "AZZ", "}"}], ",", "\n", "\t", 
    RowBox[{
     RowBox[{"AZZ", "=", 
      RowBox[{"Table", "[", 
       RowBox[{"0", ",", 
        RowBox[{"{", 
         RowBox[{"x", ",", "1", ",", "108"}], "}"}]}], "]"}]}], ";", "\n", 
     "\t", 
     RowBox[{"Do", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"AZZ", "[", 
         RowBox[{"[", "x", "]"}], "]"}], "=", 
        RowBox[{"p", "[", 
         RowBox[{"[", "x", "]"}], "]"}]}], ",", 
       RowBox[{"{", 
        RowBox[{"x", ",", "1", ",", "19", ",", "6"}], "}"}]}], "]"}], ";", 
     "\n", "\t", 
     RowBox[{"Do", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"AZZ", "[", 
         RowBox[{"[", 
          RowBox[{"x", "+", "3"}], "]"}], "]"}], "=", 
        RowBox[{"p", "[", 
         RowBox[{"[", "x", "]"}], "]"}]}], ",", 
       RowBox[{"{", 
        RowBox[{"x", ",", "1", ",", "19", ",", "6"}], "}"}]}], "]"}], ";", 
     "\n", "\t", 
     RowBox[{"Do", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"AZZ", "[", 
         RowBox[{"[", 
          RowBox[{"x", "+", "54"}], "]"}], "]"}], "=", 
        RowBox[{"p", "[", 
         RowBox[{"[", 
          RowBox[{"x", "+", "1"}], "]"}], "]"}]}], ",", 
       RowBox[{"{", 
        RowBox[{"x", ",", "1", ",", "19", ",", "6"}], "}"}]}], "]"}], ";", 
     "\n", "\t", 
     RowBox[{"Do", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"AZZ", "[", 
         RowBox[{"[", 
          RowBox[{"x", "+", "54", "+", "3"}], "]"}], "]"}], "=", 
        RowBox[{"-", 
         RowBox[{"p", "[", 
          RowBox[{"[", 
           RowBox[{"x", "+", "1"}], "]"}], "]"}]}]}], ",", 
       RowBox[{"{", 
        RowBox[{"x", ",", "1", ",", "19", ",", "6"}], "}"}]}], "]"}], ";", 
     "\n", "\t", "\n", "\t", 
     RowBox[{"Do", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"AZZ", "[", 
         RowBox[{"[", 
          RowBox[{"x", "+", "1"}], "]"}], "]"}], "=", 
        RowBox[{"p", "[", 
         RowBox[{"[", 
          RowBox[{"x", "+", "1", "+", "1"}], "]"}], "]"}]}], ",", 
       RowBox[{"{", 
        RowBox[{"x", ",", "1", ",", "19", ",", "6"}], "}"}]}], "]"}], ";", 
     "\n", "\t", 
     RowBox[{"Do", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"AZZ", "[", 
         RowBox[{"[", 
          RowBox[{"x", "+", "3", "+", "1"}], "]"}], "]"}], "=", 
        RowBox[{"p", "[", 
         RowBox[{"[", 
          RowBox[{"x", "+", "1", "+", "1"}], "]"}], "]"}]}], ",", 
       RowBox[{"{", 
        RowBox[{"x", ",", "1", ",", "19", ",", "6"}], "}"}]}], "]"}], ";", 
     "\n", "\t", 
     RowBox[{"Do", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"AZZ", "[", 
         RowBox[{"[", 
          RowBox[{"x", "+", "1", "+", "54"}], "]"}], "]"}], "=", 
        RowBox[{"p", "[", 
         RowBox[{"[", 
          RowBox[{"x", "+", "1", "+", "2"}], "]"}], "]"}]}], ",", 
       RowBox[{"{", 
        RowBox[{"x", ",", "1", ",", "19", ",", "6"}], "}"}]}], "]"}], ";", 
     "\n", "\t", 
     RowBox[{"Do", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"AZZ", "[", 
         RowBox[{"[", 
          RowBox[{"x", "+", "3", "+", "1", "+", "54"}], "]"}], "]"}], "=", 
        RowBox[{"-", 
         RowBox[{"p", "[", 
          RowBox[{"[", 
           RowBox[{"x", "+", "1", "+", "2"}], "]"}], "]"}]}]}], ",", 
       RowBox[{"{", 
        RowBox[{"x", ",", "1", ",", "19", ",", "6"}], "}"}]}], "]"}], ";", 
     "\n", "\t", "\n", "\t", 
     RowBox[{"Do", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"AZZ", "[", 
         RowBox[{"[", 
          RowBox[{"x", "+", "2"}], "]"}], "]"}], "=", 
        RowBox[{"p", "[", 
         RowBox[{"[", 
          RowBox[{"x", "+", "2", "+", "2"}], "]"}], "]"}]}], ",", 
       RowBox[{"{", 
        RowBox[{"x", ",", "1", ",", "19", ",", "6"}], "}"}]}], "]"}], ";", 
     "\n", "\t", 
     RowBox[{"Do", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"AZZ", "[", 
         RowBox[{"[", 
          RowBox[{"x", "+", "3", "+", "2"}], "]"}], "]"}], "=", 
        RowBox[{"p", "[", 
         RowBox[{"[", 
          RowBox[{"x", "+", "2", "+", "2"}], "]"}], "]"}]}], ",", 
       RowBox[{"{", 
        RowBox[{"x", ",", "1", ",", "19", ",", "6"}], "}"}]}], "]"}], ";", 
     "\n", "\t", 
     RowBox[{"Do", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"AZZ", "[", 
         RowBox[{"[", 
          RowBox[{"x", "+", "2", "+", "54"}], "]"}], "]"}], "=", 
        RowBox[{"p", "[", 
         RowBox[{"[", 
          RowBox[{"x", "+", "2", "+", "2", "+", "1"}], "]"}], "]"}]}], ",", 
       RowBox[{"{", 
        RowBox[{"x", ",", "1", ",", "19", ",", "6"}], "}"}]}], "]"}], ";", 
     "\n", "\t", 
     RowBox[{"Do", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"AZZ", "[", 
         RowBox[{"[", 
          RowBox[{"x", "+", "3", "+", "2", "+", "54"}], "]"}], "]"}], "=", 
        RowBox[{"-", 
         RowBox[{"p", "[", 
          RowBox[{"[", 
           RowBox[{"x", "+", "2", "+", "2", "+", "1"}], "]"}], "]"}]}]}], ",", 
       RowBox[{"{", 
        RowBox[{"x", ",", "1", ",", "19", ",", "6"}], "}"}]}], "]"}], ";", 
     "\n", "\t", "\n", "\t", 
     RowBox[{"Do", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"AZZ", "[", 
         RowBox[{"[", "x", "]"}], "]"}], "=", 
        RowBox[{"p", "[", 
         RowBox[{"[", "x", "]"}], "]"}]}], ",", 
       RowBox[{"{", 
        RowBox[{"x", ",", "25", ",", "43", ",", "2"}], "}"}]}], "]"}], ";", 
     "\n", "\t", 
     RowBox[{"Do", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"AZZ", "[", 
         RowBox[{"[", 
          RowBox[{"x", "+", "1"}], "]"}], "]"}], "=", 
        RowBox[{"p", "[", 
         RowBox[{"[", "x", "]"}], "]"}]}], ",", 
       RowBox[{"{", 
        RowBox[{"x", ",", "25", ",", "43", ",", "2"}], "}"}]}], "]"}], ";", 
     "\n", "\t", 
     RowBox[{"Do", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"AZZ", "[", 
         RowBox[{"[", 
          RowBox[{"x", "+", "54"}], "]"}], "]"}], "=", 
        RowBox[{"p", "[", 
         RowBox[{"[", 
          RowBox[{"x", "+", "1"}], "]"}], "]"}]}], ",", 
       RowBox[{"{", 
        RowBox[{"x", ",", "25", ",", "43", ",", "2"}], "}"}]}], "]"}], ";", 
     "\n", "\t", 
     RowBox[{"Do", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"AZZ", "[", 
         RowBox[{"[", 
          RowBox[{"x", "+", "1", "+", "54"}], "]"}], "]"}], "=", 
        RowBox[{"-", 
         RowBox[{"p", "[", 
          RowBox[{"[", 
           RowBox[{"x", "+", "1"}], "]"}], "]"}]}]}], ",", 
       RowBox[{"{", 
        RowBox[{"x", ",", "25", ",", "43", ",", "2"}], "}"}]}], "]"}], ";", 
     "\n", "\t", "\n", "\t", 
     RowBox[{"Do", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"AZZ", "[", 
         RowBox[{"[", "x", "]"}], "]"}], "=", 
        RowBox[{"p", "[", 
         RowBox[{"[", "x", "]"}], "]"}]}], ",", 
       RowBox[{"{", 
        RowBox[{"x", ",", "45", ",", "54"}], "}"}]}], "]"}], ";", "\n", "\t", 
     RowBox[{"Do", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"AZZ", "[", 
         RowBox[{"[", 
          RowBox[{"x", "+", "54"}], "]"}], "]"}], "=", "0"}], ",", 
       RowBox[{"{", 
        RowBox[{"x", ",", "45", ",", "54"}], "}"}]}], "]"}], ";", "\n", "\t", 
     "AZZ"}]}], "\n", "]"}]}]], "Code",
 CellLabel->
  "In[135]:=",ExpressionUUID->"2f2b4dd9-3159-44f5-90af-753538de7978"],

Cell[BoxData[
 RowBox[{
  RowBox[{"If", "[", 
   RowBox[{
    RowBox[{"FileExistsQ", "[", "tempfile3", "]"}], ",", 
    RowBox[{"Get", "[", "tempfile3", "]"}], ",", " ", 
    RowBox[{"{", 
     RowBox[{
      RowBox[{"TH", "=", 
       RowBox[{"P2", "[", "aax", "]"}]}], ";", 
      RowBox[{"HE", "=", 
       RowBox[{
        RowBox[{"ArrayFlatten", "[", 
         RowBox[{"{", 
          RowBox[{
           RowBox[{"{", 
            RowBox[{
             RowBox[{"Re", "[", "TH", "]"}], ",", 
             RowBox[{"-", 
              RowBox[{"Im", "[", "TH", "]"}]}]}], "}"}], ",", 
           RowBox[{"{", 
            RowBox[{
             RowBox[{"-", 
              RowBox[{"Im", "[", "TH", "]"}]}], ",", 
             RowBox[{"-", 
              RowBox[{"Re", "[", "TH", "]"}]}]}], "}"}]}], "}"}], "]"}], "*", 
        "\[Lambda]"}]}], ";", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{"AB", ",", "AT"}], "}"}], "=", 
       RowBox[{"Eigensystem", "[", "HE", "]"}]}], ";", 
      RowBox[{"AC", "=", 
       RowBox[{"Pick", "[", 
        RowBox[{"AT", ",", 
         RowBox[{"Negative", "[", "AB", "]"}]}], "]"}]}], ";", "\n", 
      RowBox[{"AB", "=", 
       RowBox[{"-", 
        RowBox[{"Pick", "[", 
         RowBox[{"AB", ",", 
          RowBox[{"Negative", "[", "AB", "]"}]}], "]"}]}]}], ";", "\n", 
      RowBox[{"AC", "=", 
       RowBox[{
        RowBox[{
         RowBox[{"FT", "[", 
          RowBox[{"ReplacePart", "[", 
           RowBox[{
            RowBox[{"ConstantArray", "[", 
             RowBox[{"0", ",", "54"}], "]"}], ",", 
            RowBox[{"{", 
             RowBox[{"#", "->", "1"}], "}"}]}], "]"}], "]"}], "&"}], "/@", 
        RowBox[{"Range", "[", 
         RowBox[{"1", ",", "54"}], "]"}]}]}], ";", "\n", 
      RowBox[{"AC", "=", 
       RowBox[{
        RowBox[{
         RowBox[{"#", "/", 
          RowBox[{"Norm", "[", "#", "]"}]}], "&"}], "/@", "AC"}]}], ";", "\n", 
      RowBox[{"Save", "[", 
       RowBox[{"tempfile3", ",", 
        RowBox[{"{", 
         RowBox[{"AC", ",", "AB"}], "}"}]}], "]"}], ";"}], "\n", "}"}]}], 
   "]"}], ";"}]], "Code",
 CellLabel->
  "In[136]:=",ExpressionUUID->"56afb537-0a8b-427d-b853-1eb5e353c777"],

Cell[BoxData[
 RowBox[{
  RowBox[{"Ps", "[", "aax_", "]"}], ":=", 
  RowBox[{"Block", "[", 
   RowBox[{
    RowBox[{"{", "a", "}"}], ",", "\n", 
    RowBox[{
     RowBox[{"a", "=", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{"DerSym", "[", 
         RowBox[{"x", ",", "aax"}], "]"}], ",", 
        RowBox[{"{", 
         RowBox[{"x", ",", "1", ",", "54"}], "}"}]}], "]"}]}], ";", "\n", 
     RowBox[{"Flatten", "[", 
      RowBox[{"{", 
       RowBox[{
        RowBox[{"-", 
         RowBox[{"Re", "[", "a", "]"}]}], ",", 
        RowBox[{"Im", "[", "a", "]"}]}], "}"}], "]"}]}]}], "\n", 
   "]"}]}]], "Code",
 CellLabel->
  "In[137]:=",ExpressionUUID->"daff135e-b2f1-4220-b070-6b519894e50d"],

Cell[BoxData[{
 RowBox[{
  RowBox[{"oe", "=", 
   RowBox[{"Table", "[", 
    RowBox[{"0", ",", 
     RowBox[{"{", 
      RowBox[{"x", ",", "1", ",", "108"}], "}"}]}], "]"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"IOI", "=", 
   RowBox[{"Action2", "[", "oe", "]"}]}], ";"}]}], "Code",
 CellChangeTimes->{{3.8653068480145326`*^9, 3.8653068533457837`*^9}},
 CellLabel->
  "In[152]:=",ExpressionUUID->"dfa18f15-9b4b-4f88-9ce7-b9df48240f40"],

Cell[BoxData[
 RowBox[{
  RowBox[{"HESS", "=", 
   RowBox[{"Table", "[", 
    RowBox[{
     RowBox[{
      RowBox[{"AC", "[", 
       RowBox[{"[", 
        RowBox[{"x", ",", "y"}], "]"}], "]"}], "+", 
      RowBox[{"I", "*", 
       RowBox[{"AC", "[", 
        RowBox[{"[", 
         RowBox[{"x", ",", 
          RowBox[{"y", "+", "54"}]}], "]"}], "]"}]}]}], ",", 
     RowBox[{"{", 
      RowBox[{"x", ",", "1", ",", "54"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"y", ",", "1", ",", "54"}], "}"}]}], "]"}]}], ";"}]], "Code",
 CellLabel->
  "In[154]:=",ExpressionUUID->"9f56aba6-ef3e-40a6-9b52-05d76c39639f"],

Cell[BoxData[
 RowBox[{
  RowBox[{"AZ", "=", 
   RowBox[{"Table", "[", 
    RowBox[{
     RowBox[{"ToExpression", "[", 
      RowBox[{"\"\<X\>\"", "<>", 
       RowBox[{"ToString", "[", "x", "]"}]}], "]"}], ",", 
     RowBox[{"{", 
      RowBox[{"x", ",", "1", ",", "108"}], "}"}]}], "]"}]}], ";"}]], "Code",
 CellLabel->
  "In[155]:=",ExpressionUUID->"31cb509f-d84d-4770-9370-f1c65678250a"],

Cell[BoxData[
 RowBox[{
  RowBox[{"AZ1", "=", 
   RowBox[{"Table", "[", 
    RowBox[{
     RowBox[{"ToExpression", "[", 
      RowBox[{"\"\<X\>\"", "<>", 
       RowBox[{"ToString", "[", "x", "]"}], "<>", "\"\<[\>\"", "<>", 
       RowBox[{"ToString", "[", "0", "]"}], "<>", "\"\<]\>\""}], "]"}], ",", 
     RowBox[{"{", 
      RowBox[{"x", ",", "1", ",", "108"}], "}"}]}], "]"}]}], ";"}]], "Code",
 CellLabel->
  "In[156]:=",ExpressionUUID->"4637f57d-6d8c-4947-bf61-3e73bd44add4"],

Cell[BoxData[
 RowBox[{
  RowBox[{"AZ2", "=", 
   RowBox[{"Table", "[", 
    RowBox[{
     RowBox[{"Unevaluated", "[", 
      RowBox[{"ToExpression", "[", 
       RowBox[{"\"\<X\>\"", "<>", 
        RowBox[{"ToString", "[", "x", "]"}], "<>", "\"\<[\>\"", "<>", 
        RowBox[{"ToString", "[", "t", "]"}], "<>", "\"\<]\>\""}], "]"}], 
      "]"}], ",", 
     RowBox[{"{", 
      RowBox[{"x", ",", "1", ",", "108"}], "}"}]}], "]"}]}], ";"}]], "Code",
 CellLabel->
  "In[157]:=",ExpressionUUID->"fe929c42-7ee0-4b10-961c-54de428674a8"],

Cell[BoxData[
 RowBox[{
  RowBox[{"LefsT", "[", 
   RowBox[{"px_", ",", "HESA_", ",", "TS_"}], "]"}], ":=", 
  RowBox[{"Block", "[", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{
      RowBox[{"temp1", "=", 
       RowBox[{"{", "px", "}"}]}], ",", "AA2", ",", "Sol", ",", "HH", ",", 
      RowBox[{"HSD", "=", "HESA"}], ",", "i", ",", "PF1", ",", "GG", ",", 
      "A1", ",", "A2", ",", "kkp", ",", "dds"}], "}"}], ",", "\n", 
    RowBox[{
     RowBox[{"dds", "=", 
      RowBox[{"TS", "/", "100"}]}], ";", "\n", 
     RowBox[{"AA2", "=", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"AZ1", "[", 
          RowBox[{"[", "a", "]"}], "]"}], "==", 
         RowBox[{"px", "[", 
          RowBox[{"[", "a", "]"}], "]"}]}], ",", 
        RowBox[{"{", 
         RowBox[{"a", ",", "1", ",", "108"}], "}"}]}], "]"}]}], ";", "\n", 
     RowBox[{"HH", "=", 
      RowBox[{"Catch", "[", 
       RowBox[{"Check", "[", 
        RowBox[{
         RowBox[{"Sol", "=", 
          RowBox[{"NDSolve", "[", 
           RowBox[{
            RowBox[{"{", 
             RowBox[{"AA4", ",", "AA2"}], "}"}], ",", "AZ", ",", 
            RowBox[{"{", 
             RowBox[{"t", ",", "0", ",", "TS"}], "}"}], ",", 
            RowBox[{"Method", "->", 
             RowBox[{"{", 
              RowBox[{
              "\"\<EquationSimplification\>\"", "->", "\"\<Residual\>\""}], 
              "}"}]}], ",", 
            RowBox[{"Method", "->", 
             RowBox[{"{", 
              RowBox[{"\"\<StiffnessSwitching\>\"", ",", " ", 
               RowBox[{"Method", "->", 
                RowBox[{"{", 
                 RowBox[{
                 "Automatic", ",", " ", "\"\<ImplicitRungeKutta\>\""}], 
                 "}"}]}], ",", 
               RowBox[{"PrecisionGoal", "->", "13"}], ",", 
               RowBox[{"AccuracyGoal", "->", "13"}]}], "}"}]}]}], "]"}]}], 
         ",", 
         RowBox[{"Throw", "[", "error", "]"}]}], "]"}], "]"}]}], ";", "\n", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"HH", "===", "error"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"PF1", "=", "0"}], ";", 
         RowBox[{"HSD", "=", 
          RowBox[{"{", 
           RowBox[{"{", "1", "}"}], "}"}]}], ";", 
         RowBox[{"temp1", "=", 
          RowBox[{"{", "1", "}"}]}], ";"}], "}"}], ",", 
       RowBox[{"{", "\n", 
        RowBox[{
         RowBox[{"PF1", "=", "1"}], ";", "\n", 
         RowBox[{"GG", "=", 
          RowBox[{
           RowBox[{"(", 
            RowBox[{"AZ", "/.", "Sol"}], ")"}], "[", 
           RowBox[{"[", "1", "]"}], "]"}]}], ";", "\n", 
         RowBox[{"temp1", "=", 
          RowBox[{"Table", "[", 
           RowBox[{
            RowBox[{"Table", "[", 
             RowBox[{
              RowBox[{
               RowBox[{"GG", "[", 
                RowBox[{"[", "x", "]"}], "]"}], "[", "y", "]"}], ",", 
              RowBox[{"{", 
               RowBox[{"x", ",", "1", ",", "108"}], "}"}]}], "]"}], ",", 
            RowBox[{"{", 
             RowBox[{"y", ",", "0", ",", "TS", ",", "dds"}], "}"}]}], "]"}]}],
          ";", "\n", 
         RowBox[{"kkp", "=", 
          RowBox[{"Re", "[", 
           RowBox[{"P3", "[", "temp1", "]"}], "]"}]}], ";", "\n", 
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{
            RowBox[{"Abs", "[", 
             RowBox[{
              RowBox[{"Im", "[", 
               RowBox[{"P3", "[", 
                RowBox[{"First", "[", "temp1", "]"}], "]"}], "]"}], "-", 
              RowBox[{"Im", "[", 
               RowBox[{"P3", "[", 
                RowBox[{"Last", "[", "temp1", "]"}], "]"}], "]"}]}], "]"}], 
            ">", 
            RowBox[{"10", "^", 
             RowBox[{"(", 
              RowBox[{"-", "2"}], ")"}]}]}], ",", 
           RowBox[{"{", 
            RowBox[{
             RowBox[{"PF1", "=", "2"}], ";"}], "}"}], ",", 
           RowBox[{"{", "\n", 
            RowBox[{
             RowBox[{"HSD", "=", 
              RowBox[{"{", 
               RowBox[{"{", "1", "}"}], "}"}]}], ";"}], "\n", "}"}]}], "]"}], 
         ";"}], "\n", "}"}]}], "]"}], ";", "\n", "\n", 
     RowBox[{"{", 
      RowBox[{"PF1", ",", 
       RowBox[{"Det", "[", "HSD", "]"}], ",", 
       RowBox[{"First", "[", "temp1", "]"}], ",", 
       RowBox[{"Last", "[", "temp1", "]"}]}], "}"}]}]}], "\n", 
   "]"}]}]], "Code",
 CellChangeTimes->{{3.865306883903793*^9, 3.8653068867647943`*^9}},
 CellLabel->
  "In[158]:=",ExpressionUUID->"db4a86a3-d988-456b-b70b-6ad6ba7e2aa4"],

Cell[BoxData[{
 RowBox[{
  RowBox[{
   RowBox[{"RKF78", "[", 
    RowBox[{"a_", ",", "dt_"}], "]"}], ":=", 
   RowBox[{"Block", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
      "DS1", ",", "DS2", ",", "DS3", ",", "DS4", ",", "DS5", ",", "DS6", ",", 
       "DS", ",", "DSP", ",", "RDAA", ",", "BB", ",", "HH", ",", "i", ",", 
       "x"}], "}"}], ",", "\n", 
     RowBox[{
      RowBox[{"HH", "=", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"41", "/", "840"}], ",", "0", ",", "0", ",", "0", ",", "0", 
         ",", 
         RowBox[{"34", "/", "105"}], ",", 
         RowBox[{"9", "/", "35"}], ",", 
         RowBox[{"9", "/", "35"}], ",", 
         RowBox[{"9", "/", "280"}], ",", 
         RowBox[{"9", "/", "280"}], ",", 
         RowBox[{"41", "/", "840"}], ",", "0", ",", "0"}], "}"}]}], ";", "\n", 
      RowBox[{"BB", "=", 
       RowBox[{"{", "\n", "\t", 
        RowBox[{
         RowBox[{"{", "0", "}"}], ",", "\n", "\t", 
         RowBox[{"{", 
          RowBox[{"2", "/", "27"}], "}"}], ",", "\n", "\t", 
         RowBox[{"{", 
          RowBox[{
           RowBox[{"1", "/", "36"}], ",", 
           RowBox[{"1", "/", "12"}]}], "}"}], ",", "\n", "\t", 
         RowBox[{"{", 
          RowBox[{
           RowBox[{"1", "/", "24"}], ",", "0", ",", 
           RowBox[{"1", "/", "8"}]}], "}"}], ",", "\n", "\t", 
         RowBox[{"{", 
          RowBox[{
           RowBox[{"20", "/", "48"}], ",", "0", ",", 
           RowBox[{
            RowBox[{"-", "75"}], "/", "48"}], ",", 
           RowBox[{"75", "/", "48"}]}], "}"}], ",", "\n", "\t", 
         RowBox[{"{", 
          RowBox[{
           RowBox[{"1", "/", "20"}], ",", "0", ",", "0", ",", 
           RowBox[{"5", "/", "20"}], ",", 
           RowBox[{"4", "/", "20"}]}], "}"}], ",", "\n", "\t", 
         RowBox[{"{", 
          RowBox[{
           RowBox[{
            RowBox[{"-", "25"}], "/", "108"}], ",", "0", ",", "0", ",", 
           RowBox[{"125", "/", "108"}], ",", 
           RowBox[{
            RowBox[{"-", "260"}], "/", "108"}], ",", 
           RowBox[{"250", "/", "108"}]}], "}"}], ",", "\n", "\t", 
         RowBox[{"{", 
          RowBox[{
           RowBox[{"31", "/", "300"}], ",", "0", ",", "0", ",", "0", ",", 
           RowBox[{"61", "/", "225"}], ",", 
           RowBox[{
            RowBox[{"-", "2"}], "/", "9"}], ",", 
           RowBox[{"13", "/", "900"}]}], "}"}], ",", "\n", "\t", 
         RowBox[{"{", 
          RowBox[{"2", ",", "0", ",", "0", ",", 
           RowBox[{
            RowBox[{"-", "53"}], "/", "6"}], ",", 
           RowBox[{"704", "/", "45"}], ",", 
           RowBox[{
            RowBox[{"-", "107"}], "/", "9"}], ",", 
           RowBox[{"67", "/", "90"}], ",", "3"}], "}"}], ",", "\n", "\t", 
         RowBox[{"{", 
          RowBox[{
           RowBox[{
            RowBox[{"-", "91"}], "/", "108"}], ",", "0", ",", "0", ",", 
           RowBox[{"23", "/", "108"}], ",", 
           RowBox[{
            RowBox[{"-", "976"}], "/", "135"}], ",", 
           RowBox[{"311", "/", "54"}], ",", 
           RowBox[{
            RowBox[{"-", "19"}], "/", "60"}], ",", 
           RowBox[{"17", "/", "6"}], ",", 
           RowBox[{
            RowBox[{"-", "1"}], "/", "12"}]}], "}"}], ",", "\n", "\t", 
         RowBox[{"{", 
          RowBox[{
           RowBox[{"2383", "/", "4100"}], ",", "0", ",", "0", ",", 
           RowBox[{
            RowBox[{"-", "341"}], "/", "164"}], ",", 
           RowBox[{"4496", "/", "1025"}], ",", 
           RowBox[{
            RowBox[{"-", "301"}], "/", "82"}], ",", 
           RowBox[{"2133", "/", "4100"}], ",", 
           RowBox[{"45", "/", "82"}], ",", 
           RowBox[{"45", "/", "164"}], ",", 
           RowBox[{"18", "/", "41"}]}], "}"}], ",", "\n", "\t", 
         RowBox[{"{", 
          RowBox[{
           RowBox[{"3", "/", "205"}], ",", "0", ",", "0", ",", "0", ",", "0", 
           ",", 
           RowBox[{
            RowBox[{"-", "6"}], "/", "41"}], ",", 
           RowBox[{
            RowBox[{"-", "3"}], "/", "205"}], ",", 
           RowBox[{
            RowBox[{"-", "3"}], "/", "41"}], ",", 
           RowBox[{"3", "/", "41"}], ",", 
           RowBox[{"6", "/", "41"}], ",", "0"}], "}"}], ",", "\n", "\t", 
         RowBox[{"{", 
          RowBox[{
           RowBox[{
            RowBox[{"-", "1777"}], "/", "4100"}], ",", "0", ",", "0", ",", 
           RowBox[{
            RowBox[{"-", "341"}], "/", "164"}], ",", 
           RowBox[{"4496", "/", "1025"}], ",", 
           RowBox[{
            RowBox[{"-", "289"}], "/", "82"}], ",", 
           RowBox[{"2193", "/", "4100"}], ",", 
           RowBox[{"51", "/", "82"}], ",", 
           RowBox[{"33", "/", "164"}], ",", 
           RowBox[{"12", "/", "41"}], ",", "0", ",", "1"}], "}"}]}], "\n", 
        "}"}]}], ";", "\n", 
      RowBox[{"DS", "=", 
       RowBox[{"ConstantArray", "[", 
        RowBox[{"a", ",", "13"}], "]"}]}], ";", "\n", 
      RowBox[{"For", "[", 
       RowBox[{
        RowBox[{"i", "=", "1"}], ",", 
        RowBox[{"i", "<", "14"}], ",", 
        RowBox[{"i", "++"}], ",", 
        RowBox[{"{", "\n", 
         RowBox[{
          RowBox[{"If", "[", 
           RowBox[{
            RowBox[{"i", "==", "1"}], ",", 
            RowBox[{"RDAA", "=", "a"}], ",", 
            RowBox[{"RDAA", "=", 
             RowBox[{"a", "+", 
              RowBox[{"dt", "*", 
               RowBox[{
                RowBox[{"BB", "[", 
                 RowBox[{"[", "i", "]"}], "]"}], " ", ".", " ", 
                RowBox[{"Table", "[", 
                 RowBox[{
                  RowBox[{"DS", "[", 
                   RowBox[{"[", "x", "]"}], "]"}], ",", 
                  RowBox[{"{", 
                   RowBox[{"x", ",", "1", ",", 
                    RowBox[{"i", "-", "1"}]}], "}"}]}], "]"}]}]}]}]}]}], 
           "]"}], ";", "\n", 
          RowBox[{
           RowBox[{"DS", "[", 
            RowBox[{"[", "i", "]"}], "]"}], "=", 
           RowBox[{"P1", "[", "RDAA", "]"}]}], ";"}], "\n", "}"}]}], "]"}], 
      ";", "\n", 
      RowBox[{"DS1", "=", 
       RowBox[{"dt", "*", 
        RowBox[{"(", 
         RowBox[{"HH", " ", ".", " ", "DS"}], ")"}]}]}], ";", "\n", 
      RowBox[{"DSP", "=", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          RowBox[{"-", "41"}], "/", "840"}], ")"}], "*", "dt", "*", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"DS", "[", 
           RowBox[{"[", "1", "]"}], "]"}], "+", 
          RowBox[{"DS", "[", 
           RowBox[{"[", "11", "]"}], "]"}], "-", 
          RowBox[{"DS", "[", 
           RowBox[{"[", "12", "]"}], "]"}], "-", 
          RowBox[{"DS", "[", 
           RowBox[{"[", "13", "]"}], "]"}]}], ")"}]}]}], ";", "\n", 
      RowBox[{"{", 
       RowBox[{"DS1", ",", "DSP"}], "}"}]}]}], "\n", "]"}]}], "\n"}], "\n", 
 RowBox[{
  RowBox[{
   RowBox[{"STERKFS", "[", 
    RowBox[{"STE_", ",", "a_", ",", "dt_", ",", "e1_", ",", "e2_"}], "]"}], ":=", 
   RowBox[{"Block", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
       RowBox[{"dtt", "=", "dt"}], ",", "a1", ",", "a2", ",", "a3", ",", "DD",
        ",", "dtp", ",", "dt3", ",", "STS", ",", "pp", ",", "ns"}], "}"}], 
     ",", "\n", 
     RowBox[{
      RowBox[{"STS", "=", 
       RowBox[{"STE", "+", "1"}]}], ";", 
      RowBox[{"a1", "=", 
       RowBox[{"RKF78", "[", 
        RowBox[{"a", ",", "dtt"}], "]"}]}], ";", 
      RowBox[{"ns", "=", "1"}], ";", 
      RowBox[{"While", "[", 
       RowBox[{
        RowBox[{
         RowBox[{
          RowBox[{"Abs", "[", 
           RowBox[{
            RowBox[{"Im", "[", 
             RowBox[{"P3", "[", "a", "]"}], "]"}], "-", 
            RowBox[{"Im", "[", 
             RowBox[{"P3", "[", 
              RowBox[{"a", "+", 
               RowBox[{"a1", "[", 
                RowBox[{"[", "1", "]"}], "]"}]}], "]"}], "]"}]}], "]"}], ">", 
          RowBox[{"10", "^", 
           RowBox[{"(", 
            RowBox[{"-", "2"}], ")"}]}]}], "&&", 
         RowBox[{"ns", "<", "3"}]}], ",", 
        RowBox[{"{", 
         RowBox[{
          RowBox[{"ns", "+=", "1"}], ";", 
          RowBox[{"dtt", "*=", "0.1"}], ";", 
          RowBox[{"a1", "=", 
           RowBox[{"RKF78", "[", 
            RowBox[{"a", ",", "dtt"}], "]"}]}], ";"}], "}"}]}], "]"}], ";", 
      "\n", 
      RowBox[{"If", "[", 
       RowBox[{
        RowBox[{"ns", ">=", "4"}], ",", 
        RowBox[{"{", "\n", 
         RowBox[{
          RowBox[{"DD", "=", 
           RowBox[{"a1", "[", 
            RowBox[{"[", "1", "]"}], "]"}]}], ";", "\n", 
          RowBox[{"dtp", "=", "dt"}], ";", "\n", 
          RowBox[{"dt3", "=", "dt"}], ";", "\n", 
          RowBox[{"STS", "=", "256"}], ";"}], "\n", "}"}], ",", 
        RowBox[{"{", "\n", 
         RowBox[{
          RowBox[{"a2", "=", 
           RowBox[{
            RowBox[{"Norm", "[", 
             RowBox[{
              RowBox[{"a1", "[", 
               RowBox[{"[", "2", "]"}], "]"}], "/", 
              RowBox[{"(", 
               RowBox[{"ConstantArray", "[", 
                RowBox[{"e1", ",", "108"}], "]"}], ")"}]}], "]"}], "/", 
            RowBox[{"Sqrt", "[", "108", "]"}]}]}], ";", "\n", "\t", 
          RowBox[{"If", "[", 
           RowBox[{
            RowBox[{
             RowBox[{"a2", "<=", "1"}], "||", 
             RowBox[{"STS", ">", "10"}]}], ",", 
            RowBox[{"{", "\n", 
             RowBox[{
              RowBox[{"If", "[", 
               RowBox[{
                RowBox[{
                 RowBox[{"Abs", "[", "a2", "]"}], "<", 
                 RowBox[{"10", "^", 
                  RowBox[{"(", 
                   RowBox[{"-", "40"}], ")"}]}]}], ",", 
                RowBox[{"{", "\n", 
                 RowBox[{
                  RowBox[{"dtp", "=", "dtt"}], ";"}], "\n", "}"}], ",", 
                RowBox[{"{", "\n", 
                 RowBox[{
                  RowBox[{"dtp", "=", 
                   RowBox[{"dtt", "*", 
                    RowBox[{"Min", "[", 
                    RowBox[{"4", ",", 
                    RowBox[{"Max", "[", 
                    RowBox[{
                    RowBox[{"1", "/", "8"}], ",", 
                    RowBox[{"0.8", "*", 
                    RowBox[{"a2", "^", 
                    RowBox[{"(", 
                    RowBox[{
                    RowBox[{"-", "1"}], "/", "7"}], ")"}]}]}]}], "]"}]}], 
                    "]"}]}]}], ";"}], "\n", "}"}]}], "]"}], ";", "\n", 
              RowBox[{"DD", "=", 
               RowBox[{"a1", "[", 
                RowBox[{"[", "1", "]"}], "]"}]}], ";", "\n", 
              RowBox[{"dt3", "=", "dtt"}], ";", "\n", 
              RowBox[{"If", "[", 
               RowBox[{
                RowBox[{"dtp", "<", 
                 RowBox[{"10", "^", 
                  RowBox[{"(", 
                   RowBox[{"-", "30"}], ")"}]}]}], ",", "\n", 
                RowBox[{
                 RowBox[{"DD", "=", 
                  RowBox[{"a1", "[", 
                   RowBox[{"[", "1", "]"}], "]"}]}], ";", "\n", 
                 RowBox[{"dtp", "=", "dt"}], ";", "\n", 
                 RowBox[{"dt3", "=", "dt"}], ";", "\n", 
                 RowBox[{"STS", "=", "256"}], ";"}]}], "\n", "]"}], ";"}], 
             "\n", "}"}], ",", 
            RowBox[{"{", "\n", 
             RowBox[{
              RowBox[{"dtp", "=", 
               RowBox[{"dtt", "*", "0.8", "*", 
                RowBox[{"a2", "^", 
                 RowBox[{"(", 
                  RowBox[{
                   RowBox[{"-", "1"}], "/", "7"}], ")"}]}]}]}], ";", "\n", 
              RowBox[{
               RowBox[{"{", 
                RowBox[{"DD", ",", "dtp", ",", "dt3", ",", "STS"}], "}"}], 
               "=", 
               RowBox[{"STERKFS", "[", 
                RowBox[{"STS", ",", "a", ",", "dtp", ",", "e1", ",", "e2"}], 
                "]"}]}]}], "\n", "}"}]}], "]"}], ";"}], "\n", "}"}]}], "]"}], 
      ";", "\n", 
      RowBox[{"{", 
       RowBox[{"DD", ",", "dtp", ",", "dt3", ",", "STS"}], "}"}]}]}], "\n", 
    "]"}]}], "\n"}], "\n", 
 RowBox[{
  RowBox[{"LefsMHt", "[", 
   RowBox[{"aax_", ",", "HESS_", ",", "TT_"}], "]"}], ":=", 
  RowBox[{"Block", "[", 
   RowBox[{
    RowBox[{"{", "\n", 
     RowBox[{
      RowBox[{"tes", "=", "aax"}], ",", "\n", "tess", ",", "\n", 
      RowBox[{"e1", "=", 
       RowBox[{"10", "^", 
        RowBox[{"(", 
         RowBox[{"-", "15"}], ")"}]}]}], ",", "\n", 
      RowBox[{"e2", "=", 
       RowBox[{"10", "^", 
        RowBox[{"(", 
         RowBox[{"-", "13"}], ")"}]}]}], ",", "\n", "px", ",", "\n", 
      RowBox[{"TY", "=", "0"}], ",", "\n", "DDD", ",", "\n", 
      RowBox[{"HSD", "=", "HESS"}], ",", "\n", 
      RowBox[{"dt", "=", 
       RowBox[{"TT", "/", "100"}]}], ",", "\n", 
      RowBox[{"STE", "=", "1"}], ",", "\n", "DDS", ",", "\n", "HH", ",", "\n",
       "kps", ",", "\n", "i", ",", "TTT", ",", "dts"}], "\n", "}"}], ",", 
    "\n", 
    RowBox[{
     RowBox[{"DDD", "=", 
      RowBox[{"{", 
       RowBox[{"aax", ",", "dt", ",", "e1", ",", "e2", ",", "STE"}], "}"}]}], 
     ";", "\n", 
     RowBox[{"DDS", "=", 
      RowBox[{"STERKFS", "[", 
       RowBox[{
        RowBox[{"DDD", "[", 
         RowBox[{"[", "5", "]"}], "]"}], ",", 
        RowBox[{"DDD", "[", 
         RowBox[{"[", "1", "]"}], "]"}], ",", 
        RowBox[{"DDD", "[", 
         RowBox[{"[", "2", "]"}], "]"}], ",", 
        RowBox[{"DDD", "[", 
         RowBox[{"[", "3", "]"}], "]"}], ",", 
        RowBox[{"DDD", "[", 
         RowBox[{"[", "4", "]"}], "]"}]}], "]"}]}], ";", "\n", 
     RowBox[{"While", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"TY", "<", "TT"}], "&&", 
        RowBox[{
         RowBox[{"DDS", "[", 
          RowBox[{"[", "4", "]"}], "]"}], "!=", "256"}]}], ",", "\n", 
       RowBox[{"{", "\n", 
        RowBox[{
         RowBox[{
          RowBox[{"DDD", "[", 
           RowBox[{"[", "5", "]"}], "]"}], "=", "1"}], ";", "\n", 
         RowBox[{"DDS", "=", 
          RowBox[{"STERKFS", "[", 
           RowBox[{
            RowBox[{"DDD", "[", 
             RowBox[{"[", "5", "]"}], "]"}], ",", 
            RowBox[{"DDD", "[", 
             RowBox[{"[", "1", "]"}], "]"}], ",", 
            RowBox[{"DDD", "[", 
             RowBox[{"[", "2", "]"}], "]"}], ",", 
            RowBox[{"DDD", "[", 
             RowBox[{"[", "3", "]"}], "]"}], ",", 
            RowBox[{"DDD", "[", 
             RowBox[{"[", "4", "]"}], "]"}]}], "]"}]}], ";", "\n", 
         RowBox[{"tes", "=", 
          RowBox[{"DDD", "[", 
           RowBox[{"[", "1", "]"}], "]"}]}], ";", "\n", 
         RowBox[{
          RowBox[{"DDD", "[", 
           RowBox[{"[", "1", "]"}], "]"}], "+=", 
          RowBox[{"DDS", "[", 
           RowBox[{"[", "1", "]"}], "]"}]}], ";", "\n", 
         RowBox[{"dt", "=", 
          RowBox[{"DDS", "[", 
           RowBox[{"[", "3", "]"}], "]"}]}], ";", "\n", 
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{"dt", "<", 
            RowBox[{"TT", "*", 
             RowBox[{"10", "^", 
              RowBox[{"(", 
               RowBox[{"-", "3"}], " ", ")"}]}]}]}], ",", 
           RowBox[{
            RowBox[{"DDS", "[", 
             RowBox[{"[", "4", "]"}], "]"}], "=", "256"}]}], "]"}], ";", "\n", 
         RowBox[{
          RowBox[{"DDD", "[", 
           RowBox[{"[", "2", "]"}], "]"}], "=", 
          RowBox[{"DDS", "[", 
           RowBox[{"[", "2", "]"}], "]"}]}], ";", "\n", 
         RowBox[{"HH", "=", 
          RowBox[{"P2", "[", 
           RowBox[{
            RowBox[{"DDD", "[", 
             RowBox[{"[", "1", "]"}], "]"}], "-", 
            RowBox[{
             RowBox[{"DDS", "[", 
              RowBox[{"[", "1", "]"}], "]"}], "/", "2"}]}], "]"}]}], ";", 
         "\n", 
         RowBox[{"HSD", "+=", 
          RowBox[{
           RowBox[{"-", 
            RowBox[{"(", 
             RowBox[{"Conjugate", "[", 
              RowBox[{"HH", " ", ".", " ", "HSD"}], "]"}], ")"}]}], "*", 
           "dt"}]}], ";", "\n", 
         RowBox[{"TY", "+=", "dt"}], ";"}], "\n", "}"}]}], "]"}], ";", "\n", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"DDS", "[", 
         RowBox[{"[", "4", "]"}], "]"}], "!=", "256"}], ",", 
       RowBox[{"{", "\n", 
        RowBox[{
         RowBox[{"TTT", "=", "TY"}], ";", "\n", 
         RowBox[{"dts", "=", "dt"}], ";", "\n", 
         RowBox[{"TY", "=", 
          RowBox[{"TY", "-", "dt"}]}], ";", "\n", 
         RowBox[{"dt", "=", 
          RowBox[{
           RowBox[{"(", 
            RowBox[{"TT", "-", "TY"}], ")"}], "/", "10"}]}], ";", "\n", 
         RowBox[{"For", "[", 
          RowBox[{
           RowBox[{"i", "=", "1"}], ",", 
           RowBox[{"i", "<", "11"}], ",", 
           RowBox[{"i", "++"}], ",", 
           RowBox[{"{", "\n", 
            RowBox[{
             RowBox[{"tess", "=", 
              RowBox[{
               RowBox[{"RKF78", "[", 
                RowBox[{"tes", ",", "dt"}], "]"}], "[", 
               RowBox[{"[", "1", "]"}], "]"}]}], ";", "\n", 
             RowBox[{"tes", "+=", "tess"}], ";", "\n", 
             RowBox[{"HH", "=", 
              RowBox[{"P2", "[", 
               RowBox[{"tes", "-", 
                RowBox[{"tess", "/", "2"}]}], "]"}]}], ";", "\n", 
             RowBox[{"HSD", "+=", 
              RowBox[{
               RowBox[{"-", 
                RowBox[{"(", 
                 RowBox[{"Conjugate", "[", 
                  RowBox[{"HH", " ", ".", " ", "HSD"}], "]"}], ")"}]}], "*", 
               "dt"}]}], ";", "\n", 
             RowBox[{"TY", "+=", "dt"}], ";"}], "\n", "}"}]}], "]"}], ";", 
         "\n", 
         RowBox[{"kps", "=", "1"}], ";"}], "\n", "}"}], ",", 
       RowBox[{"{", "\n", 
        RowBox[{
         RowBox[{"HSD", "=", 
          RowBox[{"{", 
           RowBox[{"{", "1", "}"}], "}"}]}], ";", "\n", 
         RowBox[{"kps", "=", "0"}], ";"}], "\n", "}"}]}], "]"}], ";", "\n", 
     RowBox[{"{", 
      RowBox[{"kps", ",", 
       RowBox[{"Det", "[", "HSD", "]"}], ",", "aax", ",", "tes", ",", "TY", 
       ",", "dt"}], "}"}]}]}], "\n", "]"}]}]}], "Code",
 CellLabel->
  "In[159]:=",ExpressionUUID->"2c2c3e62-9df7-4d9e-a8f6-2c62fd49da35"]
}, Open  ]],

Cell[CellGroupData[{

Cell["Slice sampling functions", "Subtitle",
 CellChangeTimes->{{3.8653060695585356`*^9, 
  3.865306077437538*^9}},ExpressionUUID->"2a355f56-868e-4601-8724-\
e17779f3ec1a"],

Cell[BoxData[
 RowBox[{
  RowBox[{"WW", "=", 
   RowBox[{"ConstantArray", "[", 
    RowBox[{"0", ",", "49"}], "]"}]}], ";"}]], "Code",
 CellLabel->
  "In[163]:=",ExpressionUUID->"40abb386-ce8f-4880-b9e1-bb6b677c7cc3"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"FF", "[", "t_", "]"}], ":=", 
   RowBox[{"Sum", "[", 
    RowBox[{
     RowBox[{
      RowBox[{"(", 
       RowBox[{
        RowBox[{"Product", "[", 
         RowBox[{
          RowBox[{"t", "-", 
           RowBox[{
            RowBox[{"Delete", "[", 
             RowBox[{
              RowBox[{"SS", "[", 
               RowBox[{"[", "1", "]"}], "]"}], ",", "y"}], "]"}], "[", 
            RowBox[{"[", "x", "]"}], "]"}]}], ",", 
          RowBox[{"{", 
           RowBox[{"x", ",", "1", ",", "48"}], "}"}]}], "]"}], "/", 
        RowBox[{"Product", "[", 
         RowBox[{
          RowBox[{
           RowBox[{"SS", "[", 
            RowBox[{"[", 
             RowBox[{"1", ",", "y"}], "]"}], "]"}], "-", 
           RowBox[{
            RowBox[{"Delete", "[", 
             RowBox[{
              RowBox[{"SS", "[", 
               RowBox[{"[", "1", "]"}], "]"}], ",", "y"}], "]"}], "[", 
            RowBox[{"[", "x", "]"}], "]"}]}], ",", 
          RowBox[{"{", 
           RowBox[{"x", ",", "1", ",", "48"}], "}"}]}], "]"}]}], ")"}], "*", 
      RowBox[{"WW", "[", 
       RowBox[{"[", "y", "]"}], "]"}]}], ",", 
     RowBox[{"{", 
      RowBox[{"y", ",", "1", ",", "49"}], "}"}]}], "]"}]}], ";"}]], "Code",
 CellLabel->
  "In[164]:=",ExpressionUUID->"009aa99b-c5e0-4e62-9d79-36a7997292c7"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"EFS", "[", "B_", "]"}], ":=", 
   RowBox[{"(", 
    RowBox[{
     RowBox[{"Log", "[", 
      RowBox[{"Abs", "[", 
       RowBox[{"B", "[", 
        RowBox[{"[", "2", "]"}], "]"}], "]"}], "]"}], "+", 
     RowBox[{"Re", "[", 
      RowBox[{"P3", "[", 
       RowBox[{"B", "[", 
        RowBox[{"[", "4", "]"}], "]"}], "]"}], "]"}]}], ")"}]}], 
  ";"}]], "Code",
 CellLabel->
  "In[165]:=",ExpressionUUID->"d1e16477-a000-4d74-91a6-a9eade4cfbf4"],

Cell[BoxData[
 RowBox[{
  RowBox[{"ESS", "[", 
   RowBox[{"x0_", ",", "LT_"}], "]"}], ":=", 
  RowBox[{"LT", "*", 
   RowBox[{"(", 
    RowBox[{
     RowBox[{"-", 
      RowBox[{"Norm", "@", 
       RowBox[{"P1", "[", "x0", "]"}]}]}], "+", 
     RowBox[{"Clip", "[", 
      RowBox[{
       RowBox[{"Log", "[", 
        RowBox[{
         RowBox[{"Abs", "[", 
          RowBox[{"Det", "[", 
           RowBox[{"P2", "[", "x0", "]"}], "]"}], "]"}], "+", 
         RowBox[{"10", "^", 
          RowBox[{"(", 
           RowBox[{"-", "200"}], ")"}]}]}], "]"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"-", "50"}], ",", "0"}], "}"}]}], "]"}]}], ")"}]}]}]], "Code",
 CellLabel->
  "In[166]:=",ExpressionUUID->"7e36e0d2-c6ef-4422-9180-2902b52f0d18"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"EFSA", "[", "B_", "]"}], ":=", 
   RowBox[{"(", 
    RowBox[{
     RowBox[{"-", 
      RowBox[{"FF", "[", 
       RowBox[{"B", "[", 
        RowBox[{"[", "5", "]"}], "]"}], "]"}]}], "+", 
     RowBox[{"Log", "[", 
      RowBox[{"Abs", "[", 
       RowBox[{"B", "[", 
        RowBox[{"[", "2", "]"}], "]"}], "]"}], "]"}], "+", 
     RowBox[{"Re", "[", 
      RowBox[{"P3", "[", 
       RowBox[{"B", "[", 
        RowBox[{"[", "4", "]"}], "]"}], "]"}], "]"}]}], ")"}]}], 
  ";"}]], "Code",
 CellLabel->
  "In[167]:=",ExpressionUUID->"730bbb67-2c0a-4999-8b5c-35cd382150fc"],

Cell[BoxData[
 RowBox[{
  RowBox[{"G", "[", 
   RowBox[{"a_", ",", "b_", ",", "c_", ",", "d_", ",", "m_", ",", "n_"}], 
   "]"}], ":=", 
  RowBox[{
   RowBox[{
    RowBox[{"J3", "[", 
     RowBox[{"[", 
      RowBox[{"m", ",", "a", ",", "b", ",", "n", ",", "c", ",", "d"}], "]"}], 
     "]"}], "/", "J4"}], "-", 
   RowBox[{
    RowBox[{
     RowBox[{"J2", "[", 
      RowBox[{"[", 
       RowBox[{"m", ",", "a", ",", "b"}], "]"}], "]"}], "/", "J4"}], "*", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"J2", "[", 
       RowBox[{"[", 
        RowBox[{"n", ",", "c", ",", "d"}], "]"}], "]"}], "/", "J4"}], 
     ")"}]}]}]}]], "Code",
 CellLabel->
  "In[168]:=",ExpressionUUID->"c76dfab4-eb82-461d-8d13-d47f7bdcaa16"],

Cell[BoxData[{
 RowBox[{
  RowBox[{"cx", "[", 
   RowBox[{"x_", ",", "NN_"}], "]"}], ":=", 
  RowBox[{"RandomSample", "[", 
   RowBox[{
    RowBox[{"Delete", "[", 
     RowBox[{
      RowBox[{"Range", "[", 
       RowBox[{"1", ",", "NN"}], "]"}], ",", "x"}], "]"}], ",", "2"}], 
   "]"}]}], "\n", 
 RowBox[{
  RowBox[{"vv", "[", 
   RowBox[{"x_", ",", "w_", ",", "XX0_", ",", "NN_"}], "]"}], ":=", 
  RowBox[{"N", "[", 
   RowBox[{"w", "*", 
    RowBox[{
     RowBox[{"Differences", "[", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{
         RowBox[{"XX0", "[", 
          RowBox[{"[", "#", "]"}], "]"}], "&"}], "/@", 
        RowBox[{"cx", "[", 
         RowBox[{"x", ",", "NN"}], "]"}]}], ")"}], "]"}], "[", 
     RowBox[{"[", "1", "]"}], "]"}]}], "]"}]}]}], "Code",
 CellLabel->
  "In[169]:=",ExpressionUUID->"326b9a0e-0d14-4638-b343-311fd91bf3fc"],

Cell[BoxData[
 RowBox[{
  RowBox[{"gb", "=", "2"}], ";", 
  RowBox[{"ga", "=", "0.0001"}], ";"}]], "Code",
 CellLabel->
  "In[171]:=",ExpressionUUID->"9c1a788a-1315-48e0-838a-d8ce27695efb"],

Cell[BoxData[
 RowBox[{
  RowBox[{"GMM", "[", 
   RowBox[{"w_", ",", "pm_", ",", "pc_"}], "]"}], ":=", 
  RowBox[{"Block", "[", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{"t1", ",", "i", ",", "j", ",", "nk", ",", "n1", ",", "n2", ",", 
      RowBox[{"t", "=", "0"}]}], "}"}], ",", "\n", 
    RowBox[{
     RowBox[{"t1", "=", 
      RowBox[{"Length", "[", "pm", "]"}]}], ";", "\n", 
     RowBox[{
      RowBox[{"{", 
       RowBox[{"i", ",", "j"}], "}"}], "=", 
      RowBox[{"RandomChoice", "[", 
       RowBox[{
        RowBox[{"Range", "[", 
         RowBox[{"1", ",", "t1"}], "]"}], ",", "2"}], "]"}]}], ";", "\n", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"i", "==", "j"}], ",", 
       RowBox[{"{", "\n", 
        RowBox[{
         RowBox[{"nk", "=", 
          RowBox[{"2", "*", "w", "*", 
           RowBox[{"RandomVariate", "[", 
            RowBox[{"MultinormalDistribution", "[", 
             RowBox[{"pc", "[", 
              RowBox[{"[", "i", "]"}], "]"}], "]"}], "]"}]}]}], ";", "\n", 
         RowBox[{"t", "=", "0"}], ";"}], "\n", "}"}], ",", 
       RowBox[{"{", "\n", 
        RowBox[{
         RowBox[{"n1", "=", 
          RowBox[{"RandomVariate", "[", 
           RowBox[{"MultinormalDistribution", "[", 
            RowBox[{
             RowBox[{"pm", "[", 
              RowBox[{"[", "i", "]"}], "]"}], ",", 
             RowBox[{"ga", "*", 
              RowBox[{"pc", "[", 
               RowBox[{"[", "i", "]"}], "]"}]}]}], "]"}], "]"}]}], ";", "\n", 
         RowBox[{"n2", "=", 
          RowBox[{"RandomVariate", "[", 
           RowBox[{"MultinormalDistribution", "[", 
            RowBox[{
             RowBox[{"pm", "[", 
              RowBox[{"[", "j", "]"}], "]"}], ",", 
             RowBox[{"ga", "*", 
              RowBox[{"pc", "[", 
               RowBox[{"[", "j", "]"}], "]"}]}]}], "]"}], "]"}]}], ";", "\n", 
         RowBox[{"nk", "=", 
          RowBox[{"gb", "*", 
           RowBox[{"(", 
            RowBox[{"n1", "-", "n2"}], ")"}]}]}], ";", "\n", 
         RowBox[{"t", "=", "1"}], ";"}], "\n", "}"}]}], "]"}], ";", "\n", 
     RowBox[{"{", 
      RowBox[{"nk", ",", "t"}], "}"}]}]}], "\n", "]"}]}]], "Code",
 CellLabel->
  "In[172]:=",ExpressionUUID->"83f5e3de-75c4-4a29-9542-f107958ddc0c"],

Cell[BoxData[
 RowBox[{
  RowBox[{"Slice1", "[", 
   RowBox[{"x0_", ",", "t0_", ",", "nx_", ",", 
    RowBox[{"ns_", ":", "100"}]}], "]"}], ":=", 
  RowBox[{"Block", "[", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{"TEMP1", ",", "GT", ",", "Y", ",", "G", ",", "L", ",", "R", ",", 
      RowBox[{"kk", "=", "1"}], ",", 
      RowBox[{"ks", "=", "1"}], ",", 
      RowBox[{"N1", "=", "1"}], ",", 
      RowBox[{"N2", "=", "1"}], ",", 
      RowBox[{"N3", "=", "1"}], ",", "xx1", ",", "y1", ",", "r1", ",", "r2", 
      ",", 
      RowBox[{"nn", "=", "nx"}], ",", 
      RowBox[{"np", "=", "ns"}], ",", 
      RowBox[{"xp", "=", "1"}], ",", "tt1", ",", "lt", ",", "ut", ",", "ts"}],
      "}"}], ",", "\n", 
    RowBox[{
     RowBox[{"Y", "=", 
      RowBox[{
       RowBox[{"RandomReal", "[", 
        RowBox[{"{", 
         RowBox[{"0", ",", "1"}], "}"}], "]"}], "*", 
       RowBox[{"(", 
        RowBox[{"Exp", "@", 
         RowBox[{"(", 
          RowBox[{"LT", "*", 
           RowBox[{"EFS", "@", 
            RowBox[{"LefsMHt", "[", 
             RowBox[{"x0", ",", "HESS", ",", "t0"}], "]"}]}]}], ")"}]}], 
        ")"}]}]}], ";", "\n", 
     RowBox[{"G", "=", 
      RowBox[{"RandomReal", "[", 
       RowBox[{"{", 
        RowBox[{"0", ",", "1"}], "}"}], "]"}]}], ";", "\n", 
     RowBox[{"L", "=", 
      RowBox[{"-", "G"}]}], ";", 
     RowBox[{"R", "=", 
      RowBox[{"L", "+", "1"}]}], ";", "\n", "\n", 
     RowBox[{"(*", 
      RowBox[{
       RowBox[{"GT", "=", 
        RowBox[{"w1", "*", 
         RowBox[{"RandomReal", "[", 
          RowBox[{"{", 
           RowBox[{"0", ",", "1"}], "}"}], "]"}]}]}], ";", "\n", 
       RowBox[{"lt", "=", "0"}], ";", "\n", 
       RowBox[{"ut", "=", 
        RowBox[{"t0", "+", "GT"}]}], ";", "\n", 
       RowBox[{"While", "[", 
        RowBox[{"True", ",", 
         RowBox[{"{", "\n", "\t", 
          RowBox[{
           RowBox[{"kk", "++"}], ";", "\n", "\t", 
           RowBox[{"TEMP1", "=", 
            RowBox[{"LefsMHt", "[", 
             RowBox[{"x0", ",", "HESS", ",", "ut"}], "]"}]}], ";", "\n", "\t", 
           RowBox[{"If", "[", 
            RowBox[{
             RowBox[{
              RowBox[{
               RowBox[{"TEMP1", "[", 
                RowBox[{"[", "1", "]"}], "]"}], "==", "0"}], "||", 
              RowBox[{"Y", ">", 
               RowBox[{"Exp", "@", 
                RowBox[{"(", 
                 RowBox[{"LT", "*", 
                  RowBox[{"EFS", "@", "TEMP1"}]}], ")"}]}]}]}], ",", 
             RowBox[{"{", 
              RowBox[{
               RowBox[{"ut", "=", 
                RowBox[{"TEMP1", "[", 
                 RowBox[{"[", "5", "]"}], "]"}]}], ";", 
               RowBox[{"Break", "[", "]"}], ";"}], "}"}], ",", 
             RowBox[{"{", 
              RowBox[{
               RowBox[{"ut", "+=", "GT"}], ";"}], "}"}]}], "]"}], ";"}], "\n",
           "}"}]}], "]"}], ";"}], "*)"}], "\n", 
     RowBox[{"ts", "=", 
      RowBox[{"{", 
       RowBox[{"TT3", ",", "TT2"}], "}"}]}], ";", "\n", "\n", 
     RowBox[{"While", "[", 
      RowBox[{"True", ",", 
       RowBox[{"{", "\n", 
        RowBox[{
         RowBox[{"TEMP1", "=", 
          RowBox[{"LefsMHt", "[", 
           RowBox[{
            RowBox[{"x0", "+", 
             RowBox[{"L", "*", "nn"}]}], ",", "HESS", ",", "t0"}], "]"}]}], 
         ";", "\n", 
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{
            RowBox[{
             RowBox[{"TEMP1", "[", 
              RowBox[{"[", "1", "]"}], "]"}], "==", "0"}], "||", 
            RowBox[{"Y", ">", 
             RowBox[{"Exp", "@", 
              RowBox[{"(", 
               RowBox[{"LT", "*", 
                RowBox[{"EFS", "@", "TEMP1"}]}], ")"}]}]}]}], ",", 
           RowBox[{
            RowBox[{"Break", "[", "]"}], ";"}], ",", 
           RowBox[{
            RowBox[{"L", "-=", "1"}], ";", 
            RowBox[{"N1", "++"}], ";"}]}], "]"}], ";", "\n", 
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{"N1", ">", "100"}], ",", 
           RowBox[{
            RowBox[{"L", "=", 
             RowBox[{"-", "G"}]}], ";", 
            RowBox[{"Break", "[", "]"}], ";"}]}], "]"}], ";"}], "\n", "}"}]}],
       "]"}], ";", "\n", "\n", 
     RowBox[{"While", "[", 
      RowBox[{"True", ",", 
       RowBox[{"{", "\n", 
        RowBox[{
         RowBox[{"TEMP1", "=", 
          RowBox[{"LefsMHt", "[", 
           RowBox[{
            RowBox[{"x0", "+", 
             RowBox[{"R", "*", "nn"}]}], ",", "HESS", ",", "t0"}], "]"}]}], 
         ";", "\n", 
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{
            RowBox[{
             RowBox[{"TEMP1", "[", 
              RowBox[{"[", "1", "]"}], "]"}], "==", "0"}], "||", 
            RowBox[{"Y", ">", 
             RowBox[{"Exp", "@", 
              RowBox[{"(", 
               RowBox[{"LT", "*", 
                RowBox[{"EFS", "@", "TEMP1"}]}], ")"}]}]}]}], ",", 
           RowBox[{
            RowBox[{"Break", "[", "]"}], ";"}], ",", 
           RowBox[{
            RowBox[{"R", "+=", "1"}], ";", 
            RowBox[{"N3", "++"}], ";"}]}], "]"}], ";", "\n", 
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{"N3", ">", "100"}], ",", 
           RowBox[{
            RowBox[{"Break", "[", "]"}], ";"}]}], "]"}]}], "\n", "}"}]}], 
      "]"}], ";", "\n", "\n", 
     RowBox[{"While", "[", 
      RowBox[{
       RowBox[{"N2", "<", "np"}], ",", 
       RowBox[{"{", "\n", "\t", 
        RowBox[{
         RowBox[{"N2", "++"}], ";", "\n", "\t", 
         RowBox[{"xx1", "=", 
          RowBox[{"RandomReal", "[", 
           RowBox[{"{", 
            RowBox[{"L", ",", "R"}], "}"}], "]"}]}], ";", "\n", "\t", 
         RowBox[{"tt1", "=", 
          RowBox[{"RandomReal", "[", "ts", "]"}]}], ";", "\n", "\t", 
         RowBox[{"TEMP1", "=", 
          RowBox[{"LefsMHt", "[", 
           RowBox[{
            RowBox[{"x0", "+", 
             RowBox[{"xx1", "*", "nn"}]}], ",", "HESS", ",", "tt1"}], "]"}]}],
          ";", "\n", "\t", 
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{
            RowBox[{"TEMP1", "[", 
             RowBox[{"[", "1", "]"}], "]"}], "==", "0"}], ",", 
           RowBox[{"{", "\n", "\t\t", 
            RowBox[{
             RowBox[{"If", "[", 
              RowBox[{
               RowBox[{
                RowBox[{"TEMP1", "[", 
                 RowBox[{"[", "5", "]"}], "]"}], ">", "TT3"}], ",", 
               RowBox[{"{", "\n", "\t\t\t", 
                RowBox[{
                 RowBox[{"ts", "=", 
                  RowBox[{"{", 
                   RowBox[{"TT3", ",", 
                    RowBox[{"TEMP1", "[", 
                    RowBox[{"[", "5", "]"}], "]"}]}], "}"}]}], ";", 
                 RowBox[{"ks", "++"}], ";", 
                 RowBox[{"Continue", "[", "]"}], ";"}], "\n", "\t\t", "}"}], 
               ",", 
               RowBox[{"{", "\n", "\t\t\t", 
                RowBox[{
                 RowBox[{"ks", "++"}], ";", 
                 RowBox[{"Continue", "[", "]"}], ";"}], "\n", "\t\t", "}"}]}],
               "]"}], ";"}], "\n", "\t", "}"}]}], "]"}], ";", "\n", "\t", 
         RowBox[{"y1", "=", 
          RowBox[{"Exp", "@", 
           RowBox[{"(", 
            RowBox[{"LT", "*", 
             RowBox[{"EFS", "@", "TEMP1"}]}], ")"}]}]}], ";", "\n", "\t", 
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{"Y", "<", "y1"}], ",", 
           RowBox[{
            RowBox[{"xp", "=", "0"}], ";", 
            RowBox[{"Break", "[", "]"}], ";"}]}], "]"}], ";", "\n", "\t", 
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{"xx1", "<", "0"}], ",", 
           RowBox[{
            RowBox[{"L", "=", "xx1"}], ";"}], ",", 
           RowBox[{
            RowBox[{"R", "=", "xx1"}], ";"}]}], "]"}], ";"}], "\n", "}"}]}], 
      "]"}], ";", "\n", "\n", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"xp", "==", "0"}], ",", 
       RowBox[{
        RowBox[{"{", 
         RowBox[{"r1", ",", "r2"}], "}"}], "=", 
        RowBox[{"{", 
         RowBox[{
          RowBox[{
           RowBox[{"xx1", "*", "nn"}], "+", "x0"}], ",", 
          RowBox[{"N", "[", 
           RowBox[{
            RowBox[{"(", 
             RowBox[{"N1", "+", "N3"}], ")"}], "/", 
            RowBox[{"(", 
             RowBox[{"N1", "+", "N3", "+", "N2"}], ")"}]}], "]"}]}], "}"}]}], 
       ",", 
       RowBox[{
        RowBox[{"{", 
         RowBox[{"r1", ",", "r2"}], "}"}], "=", 
        RowBox[{"{", 
         RowBox[{"x0", ",", "0.5065"}], "}"}]}]}], "]"}], ";", "\n", 
     RowBox[{"{", 
      RowBox[{
      "tt1", ",", "TEMP1", ",", "r2", ",", "N1", ",", "N2", ",", "N3", ",", 
       "ns"}], "}"}]}]}], "\n", "]"}]}]], "Code",
 CellLabel->
  "In[173]:=",ExpressionUUID->"01b97a18-1f29-4926-b9a9-12ae35e28448"],

Cell[BoxData[
 RowBox[{
  RowBox[{"Slice3", "[", 
   RowBox[{"x0_", ",", "nx_", ",", "LT_", ",", 
    RowBox[{"ns_", ":", "100"}]}], "]"}], ":=", 
  RowBox[{"Block", "[", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{"TEMP1", ",", "GT", ",", "Y", ",", "G", ",", "L", ",", "R", ",", 
      RowBox[{"kk", "=", "1"}], ",", 
      RowBox[{"ks", "=", "1"}], ",", 
      RowBox[{"N1", "=", "1"}], ",", 
      RowBox[{"N2", "=", "1"}], ",", 
      RowBox[{"N3", "=", "1"}], ",", "xx1", ",", "y1", ",", "r1", ",", "r2", 
      ",", 
      RowBox[{"nn", "=", "nx"}], ",", 
      RowBox[{"xp", "=", "1"}], ",", "tt1", ",", "lt", ",", "ut", ",", "ts"}],
      "}"}], ",", "\n", 
    RowBox[{
     RowBox[{"Y", "=", 
      RowBox[{
       RowBox[{"RandomReal", "[", 
        RowBox[{"{", 
         RowBox[{"0", ",", "1"}], "}"}], "]"}], "*", 
       RowBox[{"(", 
        RowBox[{"Exp", "@", 
         RowBox[{"(", 
          RowBox[{"LT", "*", 
           RowBox[{"(", 
            RowBox[{
             RowBox[{"-", 
              RowBox[{"Norm", "@", 
               RowBox[{"P1", "[", "x0", "]"}]}]}], "+", 
             RowBox[{"Clip", "[", 
              RowBox[{
               RowBox[{"Log", "[", 
                RowBox[{
                 RowBox[{"Abs", "[", 
                  RowBox[{"Det", "[", 
                   RowBox[{"P2", "[", "x0", "]"}], "]"}], "]"}], "+", 
                 RowBox[{"10", "^", 
                  RowBox[{"(", 
                   RowBox[{"-", "200"}], ")"}]}]}], "]"}], ",", 
               RowBox[{"{", 
                RowBox[{
                 RowBox[{"-", "50"}], ",", "0"}], "}"}]}], "]"}]}], ")"}]}], 
          ")"}]}], ")"}]}]}], ";", "\n", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"Y", "==", "0"}], ",", 
       RowBox[{"Y", "=", 
        RowBox[{
         RowBox[{"RandomReal", "[", 
          RowBox[{"{", 
           RowBox[{"0", ",", "1"}], "}"}], "]"}], "*", 
         RowBox[{"(", 
          RowBox[{"Exp", "@", 
           RowBox[{"(", 
            RowBox[{"LT", "*", 
             RowBox[{"(", 
              RowBox[{
               RowBox[{"-", 
                RowBox[{"Norm", "@", 
                 RowBox[{"P1", "[", "x0", "]"}]}]}], "+", 
               RowBox[{"Clip", "[", 
                RowBox[{
                 RowBox[{"Log", "[", 
                  RowBox[{
                   RowBox[{"Abs", "[", 
                    RowBox[{"Det", "[", 
                    RowBox[{"P2", "[", "x0", "]"}], "]"}], "]"}], "+", 
                   RowBox[{"10", "^", 
                    RowBox[{"(", 
                    RowBox[{"-", "200"}], ")"}]}]}], "]"}], ",", 
                 RowBox[{"{", 
                  RowBox[{
                   RowBox[{"-", "50"}], ",", "0"}], "}"}]}], "]"}]}], ")"}]}],
             ")"}]}], ")"}]}]}]}], "]"}], ";", "\n", 
     RowBox[{"G", "=", 
      RowBox[{"RandomReal", "[", 
       RowBox[{"{", 
        RowBox[{"0", ",", "1"}], "}"}], "]"}]}], ";", "\n", 
     RowBox[{"L", "=", 
      RowBox[{"-", "G"}]}], ";", 
     RowBox[{"R", "=", 
      RowBox[{"L", "+", "1"}]}], ";", "\n", "\n", 
     RowBox[{"While", "[", 
      RowBox[{
       RowBox[{"N1", "<", 
        RowBox[{"ns", "/", "2"}]}], ",", 
       RowBox[{"{", "\n", 
        RowBox[{
         RowBox[{"TEMP1", "=", 
          RowBox[{
           RowBox[{"-", 
            RowBox[{"Norm", "@", 
             RowBox[{"P1", "[", 
              RowBox[{"x0", "+", 
               RowBox[{"L", "*", "nn"}]}], "]"}]}]}], "+", 
           RowBox[{"Clip", "[", 
            RowBox[{
             RowBox[{"Log", "[", 
              RowBox[{
               RowBox[{"Abs", "[", 
                RowBox[{"Det", "[", 
                 RowBox[{"P2", "[", 
                  RowBox[{"x0", "+", 
                   RowBox[{"L", "*", "nn"}]}], "]"}], "]"}], "]"}], "+", 
               RowBox[{"10", "^", 
                RowBox[{"(", 
                 RowBox[{"-", "200"}], ")"}]}]}], "]"}], ",", 
             RowBox[{"{", 
              RowBox[{
               RowBox[{"-", "50"}], ",", "0"}], "}"}]}], "]"}]}]}], ";", "\n", 
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{"Y", ">", 
            RowBox[{"Exp", "@", 
             RowBox[{"(", 
              RowBox[{"LT", "*", "TEMP1"}], ")"}]}]}], ",", 
           RowBox[{
            RowBox[{"Break", "[", "]"}], ";"}], ",", 
           RowBox[{
            RowBox[{"L", "*=", "2"}], ";", 
            RowBox[{"N1", "++"}], ";"}]}], "]"}], ";"}], "\n", "}"}]}], "]"}],
      ";", "\n", "\n", 
     RowBox[{"While", "[", 
      RowBox[{
       RowBox[{"N3", "<", 
        RowBox[{"ns", "/", "2"}]}], ",", 
       RowBox[{"{", "\n", 
        RowBox[{
         RowBox[{"TEMP1", "=", 
          RowBox[{
           RowBox[{"-", 
            RowBox[{"Norm", "@", 
             RowBox[{"P1", "[", 
              RowBox[{"x0", "+", 
               RowBox[{"R", "*", "nn"}]}], "]"}]}]}], "+", 
           RowBox[{"Clip", "[", 
            RowBox[{
             RowBox[{"Log", "[", 
              RowBox[{
               RowBox[{"Abs", "[", 
                RowBox[{"Det", "[", 
                 RowBox[{"P2", "[", 
                  RowBox[{"x0", "+", 
                   RowBox[{"R", "*", "nn"}]}], "]"}], "]"}], "]"}], "+", 
               RowBox[{"10", "^", 
                RowBox[{"(", 
                 RowBox[{"-", "200"}], ")"}]}]}], "]"}], ",", 
             RowBox[{"{", 
              RowBox[{
               RowBox[{"-", "50"}], ",", "0"}], "}"}]}], "]"}]}]}], ";", "\n", 
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{"Y", ">", 
            RowBox[{"Exp", "@", 
             RowBox[{"(", 
              RowBox[{"LT", "*", "TEMP1"}], ")"}]}]}], ",", 
           RowBox[{
            RowBox[{"Break", "[", "]"}], ";"}], ",", 
           RowBox[{
            RowBox[{"R", "*=", "2"}], ";", 
            RowBox[{"N3", "++"}], ";"}]}], "]"}], ";"}], "\n", "}"}]}], "]"}],
      ";", "\n", "\n", 
     RowBox[{"While", "[", 
      RowBox[{
       RowBox[{"N2", "<", "ns"}], ",", 
       RowBox[{"{", "\n", "\t", 
        RowBox[{
         RowBox[{"N2", "++"}], ";", "\n", "\t", 
         RowBox[{"xx1", "=", 
          RowBox[{"RandomReal", "[", 
           RowBox[{"{", 
            RowBox[{"L", ",", "R"}], "}"}], "]"}]}], ";", "\n", "\t", 
         RowBox[{"TEMP1", "=", 
          RowBox[{
           RowBox[{"-", 
            RowBox[{"Norm", "@", 
             RowBox[{"P1", "[", 
              RowBox[{"x0", "+", 
               RowBox[{"xx1", "*", "nn"}]}], "]"}]}]}], "+", 
           RowBox[{"Clip", "[", 
            RowBox[{
             RowBox[{"Log", "[", 
              RowBox[{
               RowBox[{"Abs", "[", 
                RowBox[{"Det", "[", 
                 RowBox[{"P2", "[", 
                  RowBox[{"x0", "+", 
                   RowBox[{"xx1", "*", "nn"}]}], "]"}], "]"}], "]"}], "+", 
               RowBox[{"10", "^", 
                RowBox[{"(", 
                 RowBox[{"-", "200"}], ")"}]}]}], "]"}], ",", 
             RowBox[{"{", 
              RowBox[{
               RowBox[{"-", "50"}], ",", "0"}], "}"}]}], "]"}]}]}], ";", "\n",
          "\t", 
         RowBox[{"y1", "=", 
          RowBox[{"Exp", "@", 
           RowBox[{"(", 
            RowBox[{"LT", "*", "TEMP1"}], ")"}]}]}], ";", "\n", "\t", 
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{"Y", "<", "y1"}], ",", 
           RowBox[{
            RowBox[{"xp", "=", "0"}], ";", 
            RowBox[{"Break", "[", "]"}], ";"}]}], "]"}], ";", "\n", "\t", 
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{"xx1", "<", "0"}], ",", 
           RowBox[{
            RowBox[{"L", "=", "xx1"}], ";"}], ",", 
           RowBox[{
            RowBox[{"R", "=", "xx1"}], ";"}]}], "]"}], ";"}], "\n", "}"}]}], 
      "]"}], ";", "\n", "\n", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"xp", "==", "0"}], ",", 
       RowBox[{
        RowBox[{"{", 
         RowBox[{"r1", ",", "r2"}], "}"}], "=", 
        RowBox[{"{", 
         RowBox[{
          RowBox[{
           RowBox[{"xx1", "*", "nn"}], "+", "x0"}], ",", 
          RowBox[{"N", "[", 
           RowBox[{
            RowBox[{"(", 
             RowBox[{"N1", "+", "N3"}], ")"}], "/", 
            RowBox[{"(", 
             RowBox[{"N1", "+", "N2", "+", "N3"}], ")"}]}], "]"}]}], "}"}]}], 
       ",", 
       RowBox[{
        RowBox[{"{", 
         RowBox[{"r1", ",", "r2"}], "}"}], "=", 
        RowBox[{"{", 
         RowBox[{"x0", ",", "0.5065"}], "}"}]}]}], "]"}], ";", "\n", 
     RowBox[{"{", 
      RowBox[{"r1", ",", "r2", ",", "N1", ",", "N2", ",", "N3"}], "}"}]}]}], 
   "\n", "]"}]}]], "Code",
 CellLabel->
  "In[174]:=",ExpressionUUID->"15cd756d-c62b-465d-9705-e8391cbbbd93"]
}, Open  ]],

Cell[CellGroupData[{

Cell["Perturbative Finder", "Subtitle",
 CellChangeTimes->{{3.865306088797542*^9, 
  3.865306094940347*^9}},ExpressionUUID->"f5c6e927-9de6-46e8-a126-\
70802ec33039"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"FindCrit", "[", "ccs_", "]"}], ":=", 
   RowBox[{"Block", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
       RowBox[{"TEMP", "=", "ccs"}], ",", 
       RowBox[{"iis", "=", "ccs"}], ",", "kk", ",", "kks", ",", "ks", ",", 
       "d1", ",", "d2", ",", "C1", ",", "C1s", ",", "cc1", ",", "a"}], "}"}], 
     ",", "\n", 
     RowBox[{
      RowBox[{"kk", "=", "0"}], ";", "\n", 
      RowBox[{"While", "[", 
       RowBox[{
        RowBox[{"kk", "<", "1000"}], ",", 
        RowBox[{"{", "\n", 
         RowBox[{
          RowBox[{"d1", "=", 
           RowBox[{"P7", "[", "TEMP", "]"}]}], ";", "\n", 
          RowBox[{"d2", "=", 
           RowBox[{"P2", "[", "TEMP", "]"}]}], ";", "\n", 
          RowBox[{"kks", "=", 
           RowBox[{"Min", "[", 
            RowBox[{
             RowBox[{
              RowBox[{"Abs", "[", "#", "]"}], "&"}], "/@", 
             RowBox[{"Eigenvalues", "[", "d2", "]"}]}], "]"}]}], ";", "\n", 
          RowBox[{"If", "[", 
           RowBox[{
            RowBox[{"kks", "<", 
             RowBox[{"10", "^", 
              RowBox[{"(", 
               RowBox[{"-", "8"}], ")"}]}]}], ",", 
            RowBox[{"Break", "[", "]"}]}], "]"}], ";", "\n", 
          RowBox[{"If", "[", 
           RowBox[{
            RowBox[{"kks", ">", 
             RowBox[{"10", "^", 
              RowBox[{"(", 
               RowBox[{"-", "7"}], ")"}]}]}], ",", 
            RowBox[{"ks", "=", "0"}], ",", 
            RowBox[{"ks", "=", "1"}]}], "]"}], ";", "\n", 
          RowBox[{"C1", "=", 
           RowBox[{
            RowBox[{"Inverse", "[", "d2", "]"}], " ", ".", " ", "d1"}]}], ";",
           "\n", 
          RowBox[{"C1s", "=", 
           RowBox[{"Join", "[", 
            RowBox[{
             RowBox[{"Re", "[", "C1", "]"}], ",", 
             RowBox[{"Im", "[", "C1", "]"}]}], "]"}]}], ";", "\n", 
          RowBox[{"cc1", "=", 
           RowBox[{
            RowBox[{"(", 
             RowBox[{"Norm", "@", 
              RowBox[{"P7", "[", "TEMP", "]"}]}], ")"}], "-", 
            RowBox[{"(", 
             RowBox[{
              RowBox[{
               RowBox[{"Norm", "@", 
                RowBox[{"P7", "[", 
                 RowBox[{"TEMP", "-", 
                  RowBox[{"C1s", "*", "#"}]}], "]"}]}], "&"}], "/@", 
              RowBox[{"(", 
               RowBox[{
                RowBox[{
                 RowBox[{"10", "^", 
                  RowBox[{"(", 
                   RowBox[{"-", "#"}], ")"}]}], "&"}], "/@", 
                RowBox[{"(", 
                 RowBox[{
                  RowBox[{"Range", "[", "6", "]"}], "-", "1"}], ")"}]}], 
               ")"}]}], ")"}]}]}], ";", "\n", 
          RowBox[{"If", "[", 
           RowBox[{
            RowBox[{
             RowBox[{"Max", "[", "cc1", "]"}], "<=", 
             RowBox[{"10", "^", 
              RowBox[{"(", 
               RowBox[{"-", "16"}], ")"}]}]}], ",", 
            RowBox[{"Break", "[", "]"}]}], "]"}], ";", "\n", 
          RowBox[{"a", "=", 
           RowBox[{
            RowBox[{"(", 
             RowBox[{
              RowBox[{
               RowBox[{"10", "^", 
                RowBox[{"(", 
                 RowBox[{"-", "#"}], ")"}]}], "&"}], "/@", 
              RowBox[{"(", 
               RowBox[{
                RowBox[{"Range", "[", "6", "]"}], "-", "1"}], ")"}]}], ")"}], 
            "[", 
            RowBox[{"[", 
             RowBox[{
              RowBox[{"Position", "[", 
               RowBox[{"cc1", ",", 
                RowBox[{"Max", "[", "cc1", "]"}]}], "]"}], "[", 
              RowBox[{"[", 
               RowBox[{"1", ",", "1"}], "]"}], "]"}], "]"}], "]"}]}], ";", 
          "\n", 
          RowBox[{"TEMP", "=", 
           RowBox[{"TEMP", "-", 
            RowBox[{"C1s", "*", "a"}]}]}], ";", "\n", 
          RowBox[{"kk", "++"}]}], "\n", "}"}]}], "]"}], ";", "\n", "TEMP"}]}],
     "\n", "]"}]}], "\n", "\n"}]], "Code",
 CellLabel->
  "In[175]:=",ExpressionUUID->"bf0fc981-672d-4332-ad77-6b3da2333204"]
}, Open  ]],

Cell[CellGroupData[{

Cell["Searching Process", "Subtitle",
 CellChangeTimes->{{3.8653061087653193`*^9, 
  3.8653061184145527`*^9}},ExpressionUUID->"04f80573-e603-4932-b8b0-\
7254e56af200"],

Cell[BoxData[{
 RowBox[{
  RowBox[{"CloseKernels", "[", "]"}], ";"}], "\n", 
 RowBox[{
  RowBox[{"LaunchKernels", "[", "16", "]"}], ";"}]}], "Code",
 CellChangeTimes->{{3.865306971142948*^9, 3.8653069844955816`*^9}},
 CellLabel->
  "In[181]:=",ExpressionUUID->"97cb21e0-35b8-421b-ac3c-560fabcca6cf"],

Cell[BoxData[{
 RowBox[{
  RowBox[{"ParallelEvaluate", "[", 
   RowBox[{"Off", "[", 
    RowBox[{"General", "::", "munfl"}], "]"}], "]"}], ";"}], "\n", 
 RowBox[{
  RowBox[{"ParallelEvaluate", "[", 
   RowBox[{"Off", "[", 
    RowBox[{"General", "::", "ovfl"}], "]"}], "]"}], ";"}]}], "Code",
 CellLabel->
  "In[177]:=",ExpressionUUID->"9cf062da-6d88-47bf-a133-87e6d2174c75"],

Cell[BoxData[{
 RowBox[{
  RowBox[{"ini", "=", 
   RowBox[{"Table", "[", 
    RowBox[{
     RowBox[{"RandomReal", "[", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{
         RowBox[{"-", "10"}], ",", "10"}], "}"}], ",", "54"}], "]"}], ",", 
     RowBox[{"{", 
      RowBox[{"x", ",", "1", ",", "NN"}], "}"}]}], "]"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"x0", "=", 
   RowBox[{"ConstantArray", "[", 
    RowBox[{"0.0", ",", "54"}], "]"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"XX0", "=", 
   RowBox[{
    RowBox[{
     RowBox[{"(", 
      RowBox[{"#", " ", ".", " ", "AC"}], ")"}], "&"}], "/@", 
    RowBox[{"(", 
     RowBox[{"ini", "+", 
      RowBox[{"ConstantArray", "[", 
       RowBox[{"x0", ",", "NN"}], "]"}]}], ")"}]}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"NP", "=", 
   RowBox[{"Length", "[", "XX0", "]"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"RES", "=", 
   RowBox[{"{", "}"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"PHS", "=", 
   RowBox[{"{", "}"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"tser", "=", 
   RowBox[{"ConstantArray", "[", 
    RowBox[{"0.1", ",", "NP"}], "]"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"w1", "=", "1"}], ";"}], "\n", 
 RowBox[{
  RowBox[{"w", "=", 
   RowBox[{"ConstantArray", "[", 
    RowBox[{"w1", ",", 
     RowBox[{"NN", "+", "1"}]}], "]"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"LT", "=", "1"}], ";"}], "\n", 
 RowBox[{
  RowBox[{"J2", "=", "0"}], ";", 
  RowBox[{"J3", "=", "0"}], ";", 
  RowBox[{"J4", "=", "0"}], ";"}]}], "Code",
 CellLabel->
  "In[183]:=",ExpressionUUID->"c7d833b1-5746-4b77-8d1b-f15af96f657d"],

Cell[BoxData[{
 RowBox[{
  RowBox[{"Off", "[", 
   RowBox[{"General", "::", "munfl"}], "]"}], ";"}], "\n", 
 RowBox[{
  RowBox[{"ParallelEvaluate", "[", 
   RowBox[{"Off", "[", 
    RowBox[{"General", "::", "munfl"}], "]"}], "]"}], ";"}]}], "Code",
 CellChangeTimes->{{3.8653070418066034`*^9, 3.865307058547629*^9}},
 CellLabel->
  "In[207]:=",ExpressionUUID->"1dcf2059-7c3f-4133-b1d0-7aaf26b2f132"],

Cell[CellGroupData[{

Cell["Pre-treaments", "Subsection",
 CellChangeTimes->{{3.8653098306327343`*^9, 
  3.865309839192078*^9}},ExpressionUUID->"098e6bbb-b120-44e0-8897-\
124d9ce6d704"],

Cell[BoxData[
 RowBox[{
  RowBox[{"ii", "=", "0"}], ";"}]], "Code",
 CellLabel->
  "In[209]:=",ExpressionUUID->"b3a33e8f-6288-4038-96b0-38910faeff22"],

Cell[BoxData[
 RowBox[{
  RowBox[{"Lz", "=", "1"}], ";"}]], "Code",
 CellLabel->
  "In[210]:=",ExpressionUUID->"1ccae822-e7c5-4a14-ae98-137028ef857f"],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"TSS", "=", 
   RowBox[{
    RowBox[{
     RowBox[{"Abs", "[", 
      RowBox[{"ESS", "[", 
       RowBox[{"#", ",", "Lz"}], "]"}], "]"}], "&"}], "/@", "XX0"}]}], 
  ";"}], "\n", 
 RowBox[{
  RowBox[{"TSV", "=", 
   RowBox[{
    RowBox[{"Position", "[", 
     RowBox[{"TSS", ",", 
      RowBox[{"Max", "[", "TSS", "]"}]}], "]"}], "[", 
    RowBox[{"[", 
     RowBox[{"1", ",", "1"}], "]"}], "]"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"rest", "=", 
   RowBox[{"NSolve", "[", 
    RowBox[{
     RowBox[{
      RowBox[{"-", 
       RowBox[{"ESS", "[", 
        RowBox[{
         RowBox[{"XX0", "[", 
          RowBox[{"[", "TSV", "]"}], "]"}], ",", "Lx"}], "]"}]}], "==", 
      "100"}], ",", "Lx"}], "]"}]}], ";"}], "\n", 
 RowBox[{"Lz", "=", 
  RowBox[{"Lx", "/.", 
   RowBox[{"rest", "[", 
    RowBox[{"[", "1", "]"}], "]"}]}]}], "\n", 
 RowBox[{
  RowBox[{"V", "=", 
   RowBox[{"Table", "[", 
    RowBox[{
     RowBox[{"vv", "[", 
      RowBox[{"x", ",", 
       RowBox[{"w", "[", 
        RowBox[{"[", "x", "]"}], "]"}], ",", "XX0", ",", "NP"}], "]"}], ",", 
     RowBox[{"{", 
      RowBox[{"x", ",", "1", ",", "NP"}], "}"}]}], "]"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"TT1", "=", 
   RowBox[{"ParallelTable", "[", 
    RowBox[{
     RowBox[{"Slice3", "[", 
      RowBox[{
       RowBox[{"XX0", "[", 
        RowBox[{"[", "xx", "]"}], "]"}], ",", 
       RowBox[{"V", "[", 
        RowBox[{"[", "xx", "]"}], "]"}], ",", "Lz", ",", "100"}], "]"}], ",", 
     RowBox[{"{", 
      RowBox[{"xx", ",", "1", ",", "NP"}], "}"}]}], "]"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"XX0", "=", 
   RowBox[{"TT1", "[", 
    RowBox[{"[", 
     RowBox[{";;", ",", "1"}], "]"}], "]"}]}], ";"}]}], "Code",
 CellLabel->
  "In[211]:=",ExpressionUUID->"934bfc49-a6a0-42a7-8d6a-10ff2c4981cd"],

Cell[BoxData["4.996885410595405`"], "Output",
 CellChangeTimes->{3.8653070298508377`*^9, 3.8653070620269103`*^9},
 CellLabel->
  "Out[214]=",ExpressionUUID->"f6140ab3-7549-4460-b840-24911d250ea5"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"jj", "=", "0"}], ";"}], "\n", 
 RowBox[{"While", "[", 
  RowBox[{
   RowBox[{"jj", "<", "3"}], ",", 
   RowBox[{"{", "\n", 
    RowBox[{
     RowBox[{"ii", "=", "0"}], ";", "\n", 
     RowBox[{"XX0", "=", 
      RowBox[{"ArrayReshape", "[", "\n", "\t\t", 
       RowBox[{
        RowBox[{
         RowBox[{
          RowBox[{"Table", "[", 
           RowBox[{
            RowBox[{
             RowBox[{
              RowBox[{"RandomReal", "[", 
               RowBox[{
                RowBox[{"{", 
                 RowBox[{
                  RowBox[{"-", "0.001"}], ",", "0.001"}], "}"}], ",", "54"}], 
               "]"}], ".", "AC"}], "+", "#"}], ",", 
            RowBox[{"{", 
             RowBox[{"x", ",", "1", ",", 
              RowBox[{"NP", "/", "20"}]}], "}"}]}], "]"}], "&"}], "/@", 
         RowBox[{"(", 
          RowBox[{
           RowBox[{
            RowBox[{"TT1", "[", 
             RowBox[{"[", 
              RowBox[{"#", ",", "1"}], "]"}], "]"}], "&"}], "/@", " ", 
           RowBox[{"Ordering", "[", 
            RowBox[{
             RowBox[{
              RowBox[{
               RowBox[{"ESS", "[", 
                RowBox[{"#", ",", "Lz"}], "]"}], "&"}], "/@", 
              RowBox[{"XX0", "[", 
               RowBox[{"[", ";;", "]"}], "]"}]}], ",", 
             RowBox[{"-", "20"}]}], "]"}]}], ")"}]}], "\n", "\t", ",", 
        RowBox[{"{", 
         RowBox[{"NP", ",", "108"}], "}"}]}], "]"}]}], ";", "\n", 
     RowBox[{"While", "[", 
      RowBox[{
       RowBox[{"ii", "<", "400"}], ",", 
       RowBox[{"{", "\n", 
        RowBox[{
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{
            RowBox[{"Mod", "[", 
             RowBox[{"ii", ",", "5"}], "]"}], "==", "0"}], ",", 
           RowBox[{"{", "\n", 
            RowBox[{
             RowBox[{"TSS", "=", 
              RowBox[{
               RowBox[{
                RowBox[{"Abs", "[", 
                 RowBox[{"ESS", "[", 
                  RowBox[{"#", ",", "Lz"}], "]"}], "]"}], "&"}], "/@", 
               "XX0"}]}], ";", "\n", 
             RowBox[{"TSV", "=", 
              RowBox[{
               RowBox[{"Position", "[", 
                RowBox[{"TSS", ",", 
                 RowBox[{"Max", "[", "TSS", "]"}]}], "]"}], "[", 
               RowBox[{"[", 
                RowBox[{"1", ",", "1"}], "]"}], "]"}]}], ";", "\n", 
             RowBox[{"rest", "=", 
              RowBox[{"NSolve", "[", 
               RowBox[{
                RowBox[{
                 RowBox[{"-", 
                  RowBox[{"ESS", "[", 
                   RowBox[{
                    RowBox[{"XX0", "[", 
                    RowBox[{"[", "TSV", "]"}], "]"}], ",", "Lx"}], "]"}]}], "==",
                  "500"}], ",", "Lx"}], "]"}]}], ";", "\n", 
             RowBox[{"Ly", "=", 
              RowBox[{"Lx", "/.", 
               RowBox[{"rest", "[", 
                RowBox[{"[", "1", "]"}], "]"}]}]}], ";", "\n", 
             RowBox[{"If", "[", 
              RowBox[{
               RowBox[{"Ly", ">", "Lz"}], ",", 
               RowBox[{"Lz", "=", "Ly"}]}], "]"}], ";"}], "\n", "}"}]}], 
          "]"}], ";", "\n", 
         RowBox[{"V", "=", 
          RowBox[{"Table", "[", 
           RowBox[{
            RowBox[{"vv", "[", 
             RowBox[{"x", ",", 
              RowBox[{"w", "[", 
               RowBox[{"[", "x", "]"}], "]"}], ",", "XX0", ",", "NP"}], "]"}],
             ",", 
            RowBox[{"{", 
             RowBox[{"x", ",", "1", ",", "NP"}], "}"}]}], "]"}]}], ";", "\n", 
         RowBox[{"TT1", "=", 
          RowBox[{"ParallelTable", "[", 
           RowBox[{
            RowBox[{"Slice3", "[", 
             RowBox[{
              RowBox[{"XX0", "[", 
               RowBox[{"[", "xx", "]"}], "]"}], ",", 
              RowBox[{"V", "[", 
               RowBox[{"[", "xx", "]"}], "]"}], ",", "Lz", ",", "60"}], "]"}],
             ",", 
            RowBox[{"{", 
             RowBox[{"xx", ",", "1", ",", "NP"}], "}"}]}], "]"}]}], ";", "\n", 
         RowBox[{"XX0", "=", 
          RowBox[{"TT1", "[", 
           RowBox[{"[", 
            RowBox[{";;", ",", "1"}], "]"}], "]"}]}], ";", "\n", 
         RowBox[{"ii", "++"}], ";"}], "\n", "}"}]}], "]"}], ";", "\n", 
     RowBox[{"jj", "++"}], ";"}], "\n", "}"}]}], "]"}]}], "Code",
 CellChangeTimes->{{3.8653070963038588`*^9, 3.8653071027148604`*^9}, {
   3.865307366230773*^9, 3.86530736725521*^9}, 
   3.865309819153431*^9},ExpressionUUID->"526f1069-f3ec-4411-929e-\
61ea182fe87f"],

Cell[BoxData["$Aborted"], "Output",
 CellChangeTimes->{3.8653078715019855`*^9, 3.8653097830648575`*^9},
 CellLabel->
  "Out[232]=",ExpressionUUID->"c764ee45-cfae-4271-b567-ed2c6d60607c"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"MinMax", "@", 
  RowBox[{"(", 
   RowBox[{
    RowBox[{
     RowBox[{"Norm", "[", 
      RowBox[{"P1", "[", "#", "]"}], "]"}], "&"}], "/@", "XX0"}], 
   ")"}]}]], "Code",
 CellChangeTimes->{{3.865307418899961*^9, 3.8653074681502275`*^9}, {
  3.8653098621895113`*^9, 3.8653098688838606`*^9}},
 CellLabel->
  "In[239]:=",ExpressionUUID->"71a83527-785e-4c39-9454-519a84216fda"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"0.003072273874416128`", ",", "0.025469293818483736`"}], 
  "}"}]], "Output",
 CellChangeTimes->{3.8653098694108605`*^9},
 CellLabel->
  "Out[239]=",ExpressionUUID->"320db39c-2e1f-4362-8f69-5e5bfc97f083"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"MinMax", "@", 
  RowBox[{"(", 
   RowBox[{
    RowBox[{
     RowBox[{"Norm", "[", "#", "]"}], "&"}], "/@", "XX0"}], ")"}]}]], "Code",
 CellChangeTimes->{{3.8653098030272036`*^9, 3.86530981073637*^9}, {
  3.8653098463695726`*^9, 3.8653098583430533`*^9}},
 CellLabel->
  "In[238]:=",ExpressionUUID->"3db9082c-ca19-4943-a60d-2e0aef695458"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"0.0036032839888083153`", ",", "0.008805434103055855`"}], 
  "}"}]], "Output",
 CellChangeTimes->{
  3.86530759429696*^9, 3.8653078759001036`*^9, {3.865309793924715*^9, 
   3.8653098113843694`*^9}, {3.8653098502989717`*^9, 3.8653098594709735`*^9}},
 CellLabel->
  "Out[238]=",ExpressionUUID->"1ac85e3c-74ba-4b6b-be16-6187b9daf409"]
}, Open  ]]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["Coarse FInder", "Subtitle",
 CellChangeTimes->{{3.865310936488312*^9, 
  3.8653109405603094`*^9}},ExpressionUUID->"1cb56c09-6ed5-4f69-96a4-\
ebd7fcbf9f09"],

Cell[BoxData[
 RowBox[{
  RowBox[{"tser", "=", 
   RowBox[{"ConstantArray", "[", 
    RowBox[{"0.25", ",", "NP"}], "]"}]}], ";"}]], "Code",
 CellChangeTimes->{3.8653101227472715`*^9},
 CellLabel->
  "In[246]:=",ExpressionUUID->"f0bd6c66-0bfe-454f-818a-a1e9a172e36d"],

Cell[BoxData[{
 RowBox[{
  RowBox[{"TT3", "=", "0.25"}], ";"}], "\n", 
 RowBox[{
  RowBox[{"TT2", "=", "0.5"}], ";"}]}], "Code",
 CellLabel->
  "In[247]:=",ExpressionUUID->"7effc5db-77f5-4ba4-9ffa-49782ad195af"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"(*", 
   RowBox[{"See", " ", "if", " ", "the", " ", "time", " ", "is", " ", "ok"}], 
   "*)"}], "\n", 
  RowBox[{
   RowBox[{
    RowBox[{"ccs", "=", 
     RowBox[{
      RowBox[{
       RowBox[{"LefsMHt", "[", 
        RowBox[{"#", ",", "HESS", ",", 
         RowBox[{"tser", "[", 
          RowBox[{"[", "1", "]"}], "]"}]}], "]"}], "&"}], "/@", "XX0"}]}], 
    ";"}], "\n", 
   RowBox[{
    RowBox[{"Total", "[", 
     RowBox[{"ccs", "[", 
      RowBox[{"[", 
       RowBox[{";;", ",", "1"}], "]"}], "]"}], "]"}], "/", "NP"}]}]}]], "Code",
 CellChangeTimes->{{3.865310047593772*^9, 3.865310058888542*^9}, {
  3.8653101047884274`*^9, 3.8653101053384895`*^9}},
 CellLabel->
  "In[249]:=",ExpressionUUID->"15159e2a-9969-40f4-b55b-1ead716a503d"],

Cell[BoxData["1"], "Output",
 CellChangeTimes->{
  3.865310038962846*^9, {3.865310121564307*^9, 3.865310144329069*^9}},
 CellLabel->
  "Out[250]=",ExpressionUUID->"6f377739-ded0-458e-bc90-25a14b336634"]
}, Open  ]],

Cell[BoxData[
 RowBox[{
  RowBox[{"RES", "=", 
   RowBox[{"{", "}"}]}], ";"}]], "Code",
 CellChangeTimes->{{3.8653100178385763`*^9, 3.865310021257958*^9}},
 CellLabel->
  "In[251]:=",ExpressionUUID->"3f28c950-c026-4b24-862d-5526c83bd614"],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"ii", "=", "0"}], ";"}], "\n", 
 RowBox[{
  RowBox[{"While", "[", 
   RowBox[{
    RowBox[{"ii", "<", "100"}], ",", 
    RowBox[{"{", "\n", 
     RowBox[{
      RowBox[{"ii", "++"}], ";", "\n", 
      RowBox[{"V", "=", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{"vv", "[", 
          RowBox[{"x", ",", 
           RowBox[{"w", "[", 
            RowBox[{"[", "x", "]"}], "]"}], ",", "XX0", ",", "NP"}], "]"}], 
         ",", 
         RowBox[{"{", 
          RowBox[{"x", ",", "1", ",", "NP"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"w1", "=", 
       RowBox[{"w", "[", 
        RowBox[{"[", 
         RowBox[{"NN", "+", "1"}], "]"}], "]"}]}], ";", "\n", 
      RowBox[{"TT1", "=", 
       RowBox[{"ParallelTable", "[", 
        RowBox[{
         RowBox[{"Slice1", "[", 
          RowBox[{
           RowBox[{"XX0", "[", 
            RowBox[{"[", "xx", "]"}], "]"}], ",", 
           RowBox[{"tser", "[", 
            RowBox[{"[", "xx", "]"}], "]"}], ",", 
           RowBox[{"V", "[", 
            RowBox[{"[", "xx", "]"}], "]"}]}], "]"}], ",", 
         RowBox[{"{", 
          RowBox[{"xx", ",", "1", ",", "NP"}], "}"}]}], "]"}]}], ";", "\n", 
      RowBox[{"tser", "=", 
       RowBox[{"TT1", "[", 
        RowBox[{"[", 
         RowBox[{";;", ",", "1"}], "]"}], "]"}]}], ";", "\n", 
      RowBox[{"RES", "=", 
       RowBox[{"Join", "[", 
        RowBox[{"RES", ",", 
         RowBox[{"Table", "[", 
          RowBox[{
           RowBox[{"Append", "[", 
            RowBox[{
             RowBox[{"TT1", "[", 
              RowBox[{"[", 
               RowBox[{"x", ",", "2", ",", "4"}], "]"}], "]"}], ",", 
             RowBox[{"tser", "[", 
              RowBox[{"[", "x", "]"}], "]"}]}], "]"}], ",", 
           RowBox[{"{", 
            RowBox[{"x", ",", "1", ",", "NP"}], "}"}]}], "]"}]}], "]"}]}], 
      ";", "\n", 
      RowBox[{
       RowBox[{"w", "[", 
        RowBox[{"[", 
         RowBox[{"1", ";;", "NN"}], "]"}], "]"}], "=", 
       RowBox[{"2", "*", 
        RowBox[{"w", "[", 
         RowBox[{"[", 
          RowBox[{"1", ";;", "NN"}], "]"}], "]"}], "*", 
        RowBox[{"TT1", "[", 
         RowBox[{"[", 
          RowBox[{";;", ",", "3"}], "]"}], "]"}]}]}], ";", "\n", 
      RowBox[{"XX0", "=", 
       RowBox[{"TT1", "[", 
        RowBox[{"[", 
         RowBox[{";;", ",", "2", ",", "3"}], "]"}], "]"}]}], ";"}], "\n", 
     "}"}]}], "]"}], ";"}]}], "Code",
 CellLabel->
  "In[252]:=",ExpressionUUID->"b101eebf-cf2d-49af-9d7f-461b7017cfa6"],

Cell[BoxData["$Aborted"], "Output",
 CellChangeTimes->{3.865311013358304*^9},
 CellLabel->
  "Out[253]=",ExpressionUUID->"b8334403-b17b-4171-a506-b7f8e51dc49d"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData["ii"], "Code",
 CellChangeTimes->{{3.8653110173455887`*^9, 3.865311017499589*^9}},
 CellLabel->
  "In[254]:=",ExpressionUUID->"6812f21b-e834-4a16-a9f9-86bf5d611182"],

Cell[BoxData["8"], "Output",
 CellChangeTimes->{3.8653110180980177`*^9},
 CellLabel->
  "Out[254]=",ExpressionUUID->"2b1cb5e3-c17d-4b7d-87c2-2b1b06a2ac97"]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["Pinpoint Finder", "Subtitle",
 CellChangeTimes->{{3.865310951821312*^9, 
  3.865310957453312*^9}},ExpressionUUID->"d1936079-bb22-4dca-b780-\
46b6705ba24f"],

Cell[BoxData[{
 RowBox[{
  RowBox[{"css", "=", 
   RowBox[{
    RowBox[{"(", 
     RowBox[{
      RowBox[{
       RowBox[{"Norm", "@", 
        RowBox[{"FindCrit", "@", 
         RowBox[{"TT1", "[", 
          RowBox[{"[", 
           RowBox[{"#", ",", "2", ",", "4"}], "]"}], "]"}]}]}], "&"}], "/@", 
      RowBox[{"Ordering", "[", 
       RowBox[{
        RowBox[{
         RowBox[{
          RowBox[{"EFS", "[", "#", "]"}], "&"}], "/@", 
         RowBox[{"TT1", "[", 
          RowBox[{"[", 
           RowBox[{";;", ",", "2"}], "]"}], "]"}]}], ",", 
        RowBox[{"-", "100"}]}], "]"}]}], ")"}], "//", "Chop"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"cs1", "=", 
   RowBox[{
    RowBox[{"Position", "[", 
     RowBox[{"css", ",", 
      RowBox[{"n_", "/;", 
       RowBox[{"n", "!=", "0"}]}]}], "]"}], "[", 
    RowBox[{"[", 
     RowBox[{";;", ",", "1"}], "]"}], "]"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"cs2", "=", 
   RowBox[{
    RowBox[{"Position", "[", 
     RowBox[{"css", ",", 
      RowBox[{"n_", "/;", 
       RowBox[{"n", "==", "0"}]}]}], "]"}], "[", 
    RowBox[{"[", 
     RowBox[{";;", ",", "1"}], "]"}], "]"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"ckt", "=", 
   RowBox[{
    RowBox[{
     RowBox[{"FindCrit", "@", 
      RowBox[{"TT1", "[", 
       RowBox[{"[", 
        RowBox[{
         RowBox[{
          RowBox[{"Ordering", "[", 
           RowBox[{
            RowBox[{
             RowBox[{
              RowBox[{"EFS", "[", "#", "]"}], "&"}], "/@", 
             RowBox[{"TT1", "[", 
              RowBox[{"[", 
               RowBox[{";;", ",", "2"}], "]"}], "]"}]}], ",", 
            RowBox[{"-", "100"}]}], "]"}], "[", 
          RowBox[{"[", "#", "]"}], "]"}], ",", "2", ",", "4"}], "]"}], 
       "]"}]}], "&"}], "/@", "cs1"}]}], ";"}]}], "Code",
 CellLabel->
  "In[255]:=",ExpressionUUID->"3287e57b-bfa6-4758-9f9c-4aef5b200da9"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"Norm", "[", 
    RowBox[{"P1", "[", "#", "]"}], "]"}], "&"}], "/@", "ckt"}]], "Code",
 CellChangeTimes->{{3.865311026986436*^9, 3.865311060744785*^9}},
 CellLabel->
  "In[261]:=",ExpressionUUID->"200dbd49-4682-41cd-b241-e794beb6026b"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"4.753680216780357`*^-15", ",", "1.1643809112343362`"}], 
  "}"}]], "Output",
 CellChangeTimes->{{3.8653110282528844`*^9, 3.865311061238513*^9}},
 CellLabel->
  "Out[261]=",ExpressionUUID->"d8772806-f044-4ff9-b470-2dbdbfcbd418"]
}, Open  ]],

Cell[BoxData[
 RowBox[{
  RowBox[{"(*", 
   RowBox[{"Mannually", " ", "Pick", " ", "out", " ", "saddles"}], "*)"}], 
  "\n", 
  RowBox[{"tst", "=", 
   RowBox[{"ckt", "[", 
    RowBox[{"[", "1", "]"}], "]"}]}]}]], "Code",
 CellChangeTimes->{{3.865311079622549*^9, 
  3.865311100371687*^9}},ExpressionUUID->"5245efd4-a671-4a33-b0db-\
1802b47c1423"],

Cell[BoxData[
 RowBox[{
  RowBox[{"DumpSave", "[", 
   RowBox[{"tempfile5", ",", 
    RowBox[{"{", 
     RowBox[{"XX0", ",", "tser", ",", "tst"}], "}"}]}], "]"}], ";"}]], "Code",\
ExpressionUUID->"36f28b50-5012-4a9e-9aae-27b27d8145ab"],

Cell[BoxData[
 RowBox[{
  RowBox[{"(*", 
   RowBox[{"Read", " ", "from", " ", "The", " ", "previous"}], "*)"}], "\n", 
  RowBox[{"Get", "[", "tempfile5", "]"}]}]], "Code",
 CellChangeTimes->{{3.8653111175275383`*^9, 3.8653111313502483`*^9}},
 CellLabel->
  "In[263]:=",ExpressionUUID->"2c9c36cb-7e98-4fad-909c-2829e0f83968"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"tst", "//", "Length"}]], "Code",
 CellChangeTimes->{3.865311161766039*^9},
 CellLabel->
  "In[268]:=",ExpressionUUID->"277e6645-f54d-4986-a2b4-d15f169abd4b"],

Cell[BoxData["2"], "Output",
 CellChangeTimes->{{3.8653111582542987`*^9, 3.865311162337906*^9}},
 CellLabel->
  "Out[268]=",ExpressionUUID->"d2673a7f-b630-4c8b-9b81-a81c6bf7026c"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{
   RowBox[{"Norm", "[", 
    RowBox[{"P1", "[", "#", "]"}], "]"}], "&"}], "/@", "tst"}], "\n", 
 RowBox[{"P3", "[", 
  RowBox[{"tst", "[", 
   RowBox[{"[", "1", "]"}], "]"}], "]"}], "\n", 
 RowBox[{"P3", "[", 
  RowBox[{"tst", "[", 
   RowBox[{"[", "2", "]"}], "]"}], "]"}]}], "Code",
 CellChangeTimes->{{3.8653111649239063`*^9, 3.865311185710889*^9}},
 CellLabel->
  "In[269]:=",ExpressionUUID->"ca9b1324-dbbc-48e7-99f3-d94efdfa65f8"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"5.5404479406878835`*^-15", ",", "6.6589640749694976`*^-15"}], 
  "}"}]], "Output",
 CellChangeTimes->{3.86531113794351*^9, 3.865311186531889*^9},
 CellLabel->
  "Out[269]=",ExpressionUUID->"0d26a733-35f3-4eb1-913e-2c05170b474c"],

Cell[BoxData[
 RowBox[{
  RowBox[{"-", "0.33470450738335683`"}], "+", 
  RowBox[{"138.17879686951312`", " ", "\[ImaginaryI]"}]}]], "Output",
 CellChangeTimes->{3.86531113794351*^9, 3.8653111865358887`*^9},
 CellLabel->
  "Out[270]=",ExpressionUUID->"750076fe-63c2-4f3b-be5a-f2eabb48347b"],

Cell[BoxData[
 RowBox[{
  RowBox[{"-", "0.5519273389666748`"}], "+", 
  RowBox[{"137.62353413630137`", " ", "\[ImaginaryI]"}]}]], "Output",
 CellChangeTimes->{3.86531113794351*^9, 3.865311186539889*^9},
 CellLabel->
  "Out[271]=",ExpressionUUID->"3e126ef0-10f8-4423-9690-22ca40d215b9"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"P3", "[", 
  RowBox[{"ConstantArray", "[", 
   RowBox[{"0", ",", "108"}], "]"}], "]"}]], "Code",
 CellLabel->
  "In[266]:=",ExpressionUUID->"8f50ecb2-bca5-4f69-8e44-04003513b910"],

Cell[BoxData[
 RowBox[{
  RowBox[{"-", "1.4165751904826607`*^-12"}], "+", 
  RowBox[{"138.03672434807908`", " ", "\[ImaginaryI]"}]}]], "Output",
 CellChangeTimes->{3.8653111417676024`*^9},
 CellLabel->
  "Out[266]=",ExpressionUUID->"8464c2f5-2ed9-4ad3-b53e-a2687851d1e6"]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["Bivector checkings", "Subtitle",
 CellChangeTimes->{{3.865311324183433*^9, 
  3.8653113281041784`*^9}},ExpressionUUID->"29a67418-de16-4cc5-9dcb-\
af8cd70ad5a8"],

Cell[BoxData[
 RowBox[{
  RowBox[{"K2", "=", 
   RowBox[{"Action4", "[", 
    RowBox[{"ConstantArray", "[", 
     RowBox[{"0", ",", "108"}], "]"}], "]"}]}], ";"}]], "Code",
 CellLabel->
  "In[363]:=",ExpressionUUID->"f7460a9d-6de6-4011-86dc-250e3346f83c"],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"K1", "=", 
   RowBox[{"Action4", "[", 
    RowBox[{"tst", "[", 
     RowBox[{"[", "1", "]"}], "]"}], "]"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{
   RowBox[{"Table", "[", 
    RowBox[{
     RowBox[{
      RowBox[{"K1", "[", 
       RowBox[{"[", 
        RowBox[{"7", ",", "x"}], "]"}], "]"}], ".", 
      RowBox[{"K1", "[", 
       RowBox[{"[", 
        RowBox[{"8", ",", "x"}], "]"}], "]"}]}], ",", 
     RowBox[{"{", 
      RowBox[{"x", ",", "1", ",", "5"}], "}"}]}], "]"}], "//", "MatrixForm"}],
   "//", "Chop"}]}], "Code",
 CellChangeTimes->{{3.865312202824188*^9, 3.8653122034652724`*^9}},
 CellLabel->
  "In[391]:=",ExpressionUUID->"5ae8f8e7-e569-4bee-a342-2d569bb3ca67"],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {
      RowBox[{"(", "\[NoBreak]", 
       TagBox[GridBox[{
          {"1.`"},
          {"0"}
         },
         GridBoxAlignment->{"Columns" -> {{Center}}, "Rows" -> {{Baseline}}},
         GridBoxSpacings->{"Columns" -> {
             Offset[0.27999999999999997`], {
              Offset[0.5599999999999999]}, 
             Offset[0.27999999999999997`]}, "Rows" -> {
             Offset[0.2], {
              Offset[0.4]}, 
             Offset[0.2]}}],
        Column], "\[NoBreak]", ")"}], 
      RowBox[{"(", "\[NoBreak]", 
       TagBox[GridBox[{
          {"0"},
          {"1.`"}
         },
         GridBoxAlignment->{"Columns" -> {{Center}}, "Rows" -> {{Baseline}}},
         GridBoxSpacings->{"Columns" -> {
             Offset[0.27999999999999997`], {
              Offset[0.5599999999999999]}, 
             Offset[0.27999999999999997`]}, "Rows" -> {
             Offset[0.2], {
              Offset[0.4]}, 
             Offset[0.2]}}],
        Column], "\[NoBreak]", ")"}]},
     {
      RowBox[{"(", "\[NoBreak]", 
       TagBox[GridBox[{
          {"1.`"},
          {"0"}
         },
         GridBoxAlignment->{"Columns" -> {{Center}}, "Rows" -> {{Baseline}}},
         GridBoxSpacings->{"Columns" -> {
             Offset[0.27999999999999997`], {
              Offset[0.5599999999999999]}, 
             Offset[0.27999999999999997`]}, "Rows" -> {
             Offset[0.2], {
              Offset[0.4]}, 
             Offset[0.2]}}],
        Column], "\[NoBreak]", ")"}], 
      RowBox[{"(", "\[NoBreak]", 
       TagBox[GridBox[{
          {"0"},
          {"1.0000000000000002`"}
         },
         GridBoxAlignment->{"Columns" -> {{Center}}, "Rows" -> {{Baseline}}},
         GridBoxSpacings->{"Columns" -> {
             Offset[0.27999999999999997`], {
              Offset[0.5599999999999999]}, 
             Offset[0.27999999999999997`]}, "Rows" -> {
             Offset[0.2], {
              Offset[0.4]}, 
             Offset[0.2]}}],
        Column], "\[NoBreak]", ")"}]},
     {
      RowBox[{"(", "\[NoBreak]", 
       TagBox[GridBox[{
          {"0.9999999999999998`"},
          {"0"}
         },
         GridBoxAlignment->{"Columns" -> {{Center}}, "Rows" -> {{Baseline}}},
         GridBoxSpacings->{"Columns" -> {
             Offset[0.27999999999999997`], {
              Offset[0.5599999999999999]}, 
             Offset[0.27999999999999997`]}, "Rows" -> {
             Offset[0.2], {
              Offset[0.4]}, 
             Offset[0.2]}}],
        Column], "\[NoBreak]", ")"}], 
      RowBox[{"(", "\[NoBreak]", 
       TagBox[GridBox[{
          {"0"},
          {"1.0000000000000002`"}
         },
         GridBoxAlignment->{"Columns" -> {{Center}}, "Rows" -> {{Baseline}}},
         GridBoxSpacings->{"Columns" -> {
             Offset[0.27999999999999997`], {
              Offset[0.5599999999999999]}, 
             Offset[0.27999999999999997`]}, "Rows" -> {
             Offset[0.2], {
              Offset[0.4]}, 
             Offset[0.2]}}],
        Column], "\[NoBreak]", ")"}]},
     {
      RowBox[{"(", "\[NoBreak]", 
       TagBox[GridBox[{
          {"1.0000000000000053`"},
          {"0"}
         },
         GridBoxAlignment->{"Columns" -> {{Center}}, "Rows" -> {{Baseline}}},
         GridBoxSpacings->{"Columns" -> {
             Offset[0.27999999999999997`], {
              Offset[0.5599999999999999]}, 
             Offset[0.27999999999999997`]}, "Rows" -> {
             Offset[0.2], {
              Offset[0.4]}, 
             Offset[0.2]}}],
        Column], "\[NoBreak]", ")"}], 
      RowBox[{"(", "\[NoBreak]", 
       TagBox[GridBox[{
          {"0"},
          {"0.9999999999999947`"}
         },
         GridBoxAlignment->{"Columns" -> {{Center}}, "Rows" -> {{Baseline}}},
         GridBoxSpacings->{"Columns" -> {
             Offset[0.27999999999999997`], {
              Offset[0.5599999999999999]}, 
             Offset[0.27999999999999997`]}, "Rows" -> {
             Offset[0.2], {
              Offset[0.4]}, 
             Offset[0.2]}}],
        Column], "\[NoBreak]", ")"}]},
     {
      RowBox[{"(", "\[NoBreak]", 
       TagBox[GridBox[{
          {"0.9999999999999951`"},
          {"0"}
         },
         GridBoxAlignment->{"Columns" -> {{Center}}, "Rows" -> {{Baseline}}},
         GridBoxSpacings->{"Columns" -> {
             Offset[0.27999999999999997`], {
              Offset[0.5599999999999999]}, 
             Offset[0.27999999999999997`]}, "Rows" -> {
             Offset[0.2], {
              Offset[0.4]}, 
             Offset[0.2]}}],
        Column], "\[NoBreak]", ")"}], 
      RowBox[{"(", "\[NoBreak]", 
       TagBox[GridBox[{
          {"0"},
          {"1.0000000000000047`"}
         },
         GridBoxAlignment->{"Columns" -> {{Center}}, "Rows" -> {{Baseline}}},
         GridBoxSpacings->{"Columns" -> {
             Offset[0.27999999999999997`], {
              Offset[0.5599999999999999]}, 
             Offset[0.27999999999999997`]}, "Rows" -> {
             Offset[0.2], {
              Offset[0.4]}, 
             Offset[0.2]}}],
        Column], "\[NoBreak]", ")"}]}
    },
    GridBoxAlignment->{"Columns" -> {{Center}}, "Rows" -> {{Baseline}}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{3.865311333363177*^9, 3.8653122040244627`*^9, 
  3.8653122662394867`*^9},
 CellLabel->
  "Out[392]//MatrixForm=",ExpressionUUID->"2435f794-6c0b-4d76-bda3-\
6bb062b417b9"]
}, Open  ]],

Cell[BoxData[{
 RowBox[{
  RowBox[{
   RowBox[{"Jvec", "=", 
    RowBox[{"{", 
     RowBox[{
      RowBox[{"{", 
       RowBox[{
        RowBox[{"{", 
         RowBox[{"0", ",", "1", ",", "0", ",", "0"}], "}"}], ",", 
        RowBox[{"{", 
         RowBox[{"1", ",", "0", ",", "0", ",", "0"}], "}"}], ",", 
        RowBox[{"{", 
         RowBox[{"0", ",", "0", ",", "0", ",", "0"}], "}"}], ",", 
        RowBox[{"{", 
         RowBox[{"0", ",", "0", ",", "0", ",", "0"}], "}"}]}], "}"}], ",", 
      RowBox[{"{", 
       RowBox[{
        RowBox[{"{", 
         RowBox[{"0", ",", "0", ",", "1", ",", "0"}], "}"}], ",", 
        RowBox[{"{", 
         RowBox[{"0", ",", "0", ",", "0", ",", "0"}], "}"}], ",", 
        RowBox[{"{", 
         RowBox[{"1", ",", "0", ",", "0", ",", "0"}], "}"}], ",", 
        RowBox[{"{", 
         RowBox[{"0", ",", "0", ",", "0", ",", "0"}], "}"}]}], "}"}], ",", 
      RowBox[{"{", 
       RowBox[{
        RowBox[{"{", 
         RowBox[{"0", ",", "0", ",", "0", ",", "1"}], "}"}], ",", 
        RowBox[{"{", 
         RowBox[{"0", ",", "0", ",", "0", ",", "0"}], "}"}], ",", 
        RowBox[{"{", 
         RowBox[{"0", ",", "0", ",", "0", ",", "0"}], "}"}], ",", 
        RowBox[{"{", 
         RowBox[{"1", ",", "0", ",", "0", ",", "0"}], "}"}]}], "}"}], ",", 
      RowBox[{"-", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"0", ",", "0", ",", "0", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "0", ",", "0", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "0", ",", "0", ",", 
           RowBox[{"-", "1"}]}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "0", ",", "1", ",", "0"}], "}"}]}], "}"}]}], ",", 
      RowBox[{"-", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"0", ",", "0", ",", "0", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "0", ",", "0", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "0", ",", "0", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", 
           RowBox[{"-", "1"}], ",", "0", ",", "0"}], "}"}]}], "}"}]}], ",", 
      RowBox[{"{", 
       RowBox[{
        RowBox[{"{", 
         RowBox[{"0", ",", "0", ",", "0", ",", "0"}], "}"}], ",", 
        RowBox[{"{", 
         RowBox[{"0", ",", "0", ",", "1", ",", "0"}], "}"}], ",", 
        RowBox[{"{", 
         RowBox[{"0", ",", 
          RowBox[{"-", "1"}], ",", "0", ",", "0"}], "}"}], ",", 
        RowBox[{"{", 
         RowBox[{"0", ",", "0", ",", "0", ",", "0"}], "}"}]}], "}"}]}], 
     "}"}]}], ";"}], "\n"}], "\n", 
 RowBox[{
  RowBox[{
   RowBox[{"Jvec1", "=", 
    RowBox[{
     RowBox[{
      RowBox[{"#", " ", ".", " ", "\[Eta]"}], " ", "&"}], " ", "/@", " ", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"0", ",", "1", ",", "0", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "0", ",", "0", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "0", ",", "0", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "0", ",", "0", ",", "0"}], "}"}]}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"0", ",", "0", ",", "1", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "0", ",", "0", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "0", ",", "0", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "0", ",", "0", ",", "0"}], "}"}]}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"0", ",", "0", ",", "0", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "0", ",", "0", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "0", ",", "0", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "0", ",", "0", ",", "0"}], "}"}]}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"0", ",", "0", ",", "0", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "0", ",", "0", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "0", ",", "0", ",", 
           RowBox[{"-", "1"}]}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "0", ",", "1", ",", "0"}], "}"}]}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"0", ",", "0", ",", "0", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "0", ",", "0", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "0", ",", "0", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", 
           RowBox[{"-", "1"}], ",", "0", ",", "0"}], "}"}]}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"0", ",", "0", ",", "0", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "0", ",", "1", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", 
           RowBox[{"-", "1"}], ",", "0", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "0", ",", "0", ",", "0"}], "}"}]}], "}"}]}], 
      "}"}]}]}], ";"}], "\n"}], "\n", 
 RowBox[{
  RowBox[{
   RowBox[{"jjvec", "=", 
    RowBox[{"Join", "[", 
     RowBox[{
      RowBox[{
       RowBox[{"1", "/", "2"}], 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{"PauliMatrix", "[", "i", "]"}], ",", 
         RowBox[{"{", 
          RowBox[{"i", ",", "1", ",", "3"}], "}"}]}], "]"}]}], ",", 
      RowBox[{
       RowBox[{"I", "/", "2"}], 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{"PauliMatrix", "[", "i", "]"}], ",", 
         RowBox[{"{", 
          RowBox[{"i", ",", "1", ",", "3"}], "}"}]}], "]"}]}]}], "]"}]}], 
   ";"}], "\n"}], "\n", 
 RowBox[{
  RowBox[{
   RowBox[{"getso13new", "[", "g_", "]"}], ":=", 
   RowBox[{"MatrixExp", "[", 
    RowBox[{"Total", "[", 
     RowBox[{
      RowBox[{"Join", "[", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          RowBox[{
           RowBox[{"Re", "[", "#", "]"}], "&"}], " ", "/@", " ", 
          RowBox[{"Table", "[", 
           RowBox[{
            RowBox[{"Tr", "[", 
             RowBox[{
              RowBox[{"MatrixLog", "[", "g", "]"}], " ", ".", " ", 
              RowBox[{"PauliMatrix", "[", "i", "]"}]}], "]"}], ",", 
            RowBox[{"{", 
             RowBox[{"i", ",", "1", ",", "3"}], "}"}]}], "]"}]}], ")"}], ",", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{
           RowBox[{"Im", "[", "#", "]"}], "&"}], " ", "/@", "  ", 
          RowBox[{"Table", "[", 
           RowBox[{
            RowBox[{"Tr", "[", 
             RowBox[{
              RowBox[{"MatrixLog", "[", "g", "]"}], " ", ".", " ", 
              RowBox[{"PauliMatrix", "[", "i", "]"}]}], "]"}], ",", 
            RowBox[{"{", 
             RowBox[{"i", ",", "1", ",", "3"}], "}"}]}], "]"}]}], ")"}]}], 
       "]"}], "*", "Jvec"}], "]"}], "]"}]}], "\n"}], "\n", 
 RowBox[{
  RowBox[{
   RowBox[{"bivechalfto1", "[", "bb_", "]"}], ":=", 
   RowBox[{"Total", "[", 
    RowBox[{
     RowBox[{"Join", "[", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"Re", "[", "#", "]"}], "&"}], " ", "/@", " ", 
         RowBox[{"Table", "[", 
          RowBox[{
           RowBox[{"Tr", "[", 
            RowBox[{"bb", " ", ".", " ", 
             RowBox[{"PauliMatrix", "[", "i", "]"}]}], "]"}], ",", 
           RowBox[{"{", 
            RowBox[{"i", ",", "1", ",", "3"}], "}"}]}], "]"}]}], ")"}], ",", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"Im", "[", "#", "]"}], "&"}], " ", "/@", "  ", 
         RowBox[{"Table", "[", 
          RowBox[{
           RowBox[{"Tr", "[", 
            RowBox[{"bb", " ", ".", " ", 
             RowBox[{"PauliMatrix", "[", "i", "]"}]}], "]"}], ",", 
           RowBox[{"{", 
            RowBox[{"i", ",", "1", ",", "3"}], "}"}]}], "]"}]}], ")"}]}], 
      "]"}], "*", "Jvec"}], "]"}]}], "\n"}], "\n", 
 RowBox[{
  RowBox[{
   RowBox[{"bivec1tohalf", "[", "bivec_", "]"}], ":=", 
   RowBox[{"Total", "[", " ", 
    RowBox[{
     RowBox[{"1", "/", "2"}], " ", 
     RowBox[{"Join", "[", 
      RowBox[{
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{"Tr", "[", 
          RowBox[{"bivec", " ", ".", " ", 
           RowBox[{"Jvec", "[", 
            RowBox[{"[", "i", "]"}], "]"}]}], "]"}], ",", 
         RowBox[{"{", 
          RowBox[{"i", ",", "1", ",", "3"}], "}"}]}], "]"}], ",", 
       RowBox[{"-", 
        RowBox[{"Table", "[", 
         RowBox[{
          RowBox[{"Tr", "[", 
           RowBox[{"bivec", " ", ".", " ", 
            RowBox[{"Jvec", "[", 
             RowBox[{"[", "i", "]"}], "]"}]}], "]"}], ",", 
          RowBox[{"{", 
           RowBox[{"i", ",", "4", ",", "6"}], "}"}]}], "]"}]}]}], "]"}], "*", 
     "jjvec"}], "]"}]}], "\n"}], "\n", 
 RowBox[{
  RowBox[{
   RowBox[{"getsl2c1", "[", "aaa_", "]"}], ":=", 
   RowBox[{"MatrixExp", "[", " ", 
    RowBox[{"bivec1tohalf", "[", 
     RowBox[{"MatrixLog", "[", "aaa", "]"}], "]"}], "]"}]}], " ", 
  "\n"}], "\n", 
 RowBox[{
  RowBox[{
   RowBox[{
    RowBox[{"xifrombivecsu2", "[", "bivec_", "]"}], ":=", 
    RowBox[{"Block", "[", 
     RowBox[{
      RowBox[{"{", 
       RowBox[{"aa", ",", "bb"}], "}"}], ",", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{"aa", ",", "bb"}], "}"}], "/.", 
       RowBox[{"FindInstance", "[", 
        RowBox[{
         RowBox[{"Append", "[", 
          RowBox[{
           RowBox[{
            RowBox[{"Thread", "[", 
             RowBox[{
              RowBox[{"(", 
               RowBox[{
                RowBox[{
                 RowBox[{
                  RowBox[{"{", 
                   RowBox[{
                    RowBox[{"{", "aa", "}"}], ",", 
                    RowBox[{"{", "bb", "}"}]}], "}"}], " ", ".", " ", 
                  RowBox[{"{", 
                   RowBox[{"{", 
                    RowBox[{
                    RowBox[{"Conjugate", "[", "aa", "]"}], ",", 
                    RowBox[{"Conjugate", "[", "bb", "]"}]}], "}"}], "}"}]}], 
                 "-", 
                 RowBox[{
                  RowBox[{"1", "/", "2"}], " ", 
                  RowBox[{"IdentityMatrix", "[", "2", "]"}]}], "-", "bivec"}],
                 "//", "Flatten"}], ")"}], "==", "0"}], "]"}], "[", 
            RowBox[{"[", 
             RowBox[{"1", ";;", "2"}], "]"}], "]"}], ",", 
           RowBox[{"aa", ">", "0"}]}], "]"}], ",", 
         RowBox[{"{", 
          RowBox[{"aa", ",", "bb"}], "}"}], ",", "Complexes"}], "]"}]}]}], 
     "]"}]}], ";"}], "\n"}], "\n", 
 RowBox[{
  RowBox[{
   RowBox[{
    RowBox[{"xifrombivecsu11", "[", "bivec_", "]"}], ":=", 
    RowBox[{"Block", "[", 
     RowBox[{
      RowBox[{"{", 
       RowBox[{"aa", ",", "bb", ",", 
        RowBox[{"mm", "=", 
         RowBox[{"Sign", "[", 
          RowBox[{
           RowBox[{"bivec", "[", 
            RowBox[{"[", 
             RowBox[{"1", ",", "1"}], "]"}], "]"}], "//", "N"}], "]"}]}]}], 
       "}"}], ",", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{"aa", ",", "bb"}], "}"}], "/.", 
       RowBox[{"FindInstance", "[", 
        RowBox[{
         RowBox[{"Append", "[", 
          RowBox[{
           RowBox[{
            RowBox[{"Thread", "[", 
             RowBox[{
              RowBox[{"(", 
               RowBox[{
                RowBox[{
                 RowBox[{"mm", " ", 
                  RowBox[{
                   RowBox[{"{", 
                    RowBox[{
                    RowBox[{"{", "aa", "}"}], ",", 
                    RowBox[{"{", "bb", "}"}]}], "}"}], " ", ".", " ", 
                   RowBox[{"{", 
                    RowBox[{"{", 
                    RowBox[{
                    RowBox[{"Conjugate", "[", "aa", "]"}], ",", 
                    RowBox[{"Conjugate", "[", "bb", "]"}]}], "}"}], "}"}], 
                   " ", ".", " ", 
                   RowBox[{"PauliMatrix", "[", "3", "]"}]}]}], "-", 
                 RowBox[{
                  RowBox[{"1", "/", "2"}], " ", 
                  RowBox[{"IdentityMatrix", "[", "2", "]"}]}], "-", "bivec"}],
                 "//", "Flatten"}], ")"}], "==", "0"}], "]"}], "[", 
            RowBox[{"[", 
             RowBox[{"1", ";;", "2"}], "]"}], "]"}], ",", " ", 
           RowBox[{"aa", ">", "0"}]}], "]"}], ",", 
         RowBox[{"{", 
          RowBox[{"aa", ",", "bb"}], "}"}], ",", "Complexes"}], "]"}]}]}], 
     "]"}]}], ";"}], "\n"}], "\n", 
 RowBox[{
  RowBox[{
   RowBox[{
    RowBox[{"xifrombivecsu11", "[", "bivec_", "]"}], ":=", 
    RowBox[{"Block", "[", 
     RowBox[{
      RowBox[{"{", 
       RowBox[{"aa", ",", "bb", ",", 
        RowBox[{"mm", "=", 
         RowBox[{"Sign", "[", 
          RowBox[{
           RowBox[{
            RowBox[{"bivec", "[", 
             RowBox[{"[", 
              RowBox[{"1", ",", "1"}], "]"}], "]"}], "+", 
            RowBox[{"1", "/", "2"}]}], " ", "//", "N"}], "]"}]}]}], "}"}], 
      ",", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{"aa", ",", "bb"}], "}"}], "/.", 
       RowBox[{"FindInstance", "[", 
        RowBox[{
         RowBox[{"Append", "[", 
          RowBox[{
           RowBox[{
            RowBox[{"Thread", "[", 
             RowBox[{
              RowBox[{"(", 
               RowBox[{
                RowBox[{
                 RowBox[{"mm", " ", 
                  RowBox[{
                   RowBox[{"{", 
                    RowBox[{
                    RowBox[{"{", "aa", "}"}], ",", 
                    RowBox[{"{", "bb", "}"}]}], "}"}], " ", ".", " ", 
                   RowBox[{"{", 
                    RowBox[{"{", 
                    RowBox[{
                    RowBox[{"Conjugate", "[", "aa", "]"}], ",", 
                    RowBox[{"Conjugate", "[", "bb", "]"}]}], "}"}], "}"}], 
                   " ", ".", " ", 
                   RowBox[{"PauliMatrix", "[", "3", "]"}]}]}], "-", 
                 RowBox[{
                  RowBox[{"1", "/", "2"}], " ", 
                  RowBox[{"IdentityMatrix", "[", "2", "]"}]}], "-", "bivec"}],
                 "//", "Flatten"}], ")"}], "==", "0"}], "]"}], "[", 
            RowBox[{"[", 
             RowBox[{"1", ";;", "2"}], "]"}], "]"}], ",", " ", 
           RowBox[{"aa", ">", "0"}]}], "]"}], ",", 
         RowBox[{"{", 
          RowBox[{"aa", ",", "bb"}], "}"}], ",", "Complexes"}], "]"}]}]}], 
     "]"}]}], ";"}], "\n"}], "\n", 
 RowBox[{
  RowBox[{"xifrombivec", "[", 
   RowBox[{"bivec_", ",", "sgndet_"}], "]"}], ":=", 
  RowBox[{"If", "[", 
   RowBox[{
    RowBox[{"sgndet", ">", "0"}], ",", 
    RowBox[{"xifrombivecsu2", "[", "bivec", "]"}], ",", 
    RowBox[{"xifrombivecsu11", "[", "bivec", "]"}]}], "]"}]}]}], "Code",
 CellLabel->
  "In[278]:=",ExpressionUUID->"0127380e-83a3-437c-9042-f086802e48fa"],

Cell[BoxData[
 RowBox[{
  RowBox[{"decompose", "[", "x_", "]"}], ":=", 
  RowBox[{"Block", "[", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{
     "a", ",", "b", ",", "c", ",", "d", ",", "L", ",", "u", ",", "mu", ",", 
      "nu"}], "}"}], ",", "\n", 
    RowBox[{
     RowBox[{
      RowBox[{"{", 
       RowBox[{
        RowBox[{"{", 
         RowBox[{"a", ",", "c"}], "}"}], ",", 
        RowBox[{"{", 
         RowBox[{"b", ",", "d"}], "}"}]}], "}"}], "=", "x"}], ";", "\n", 
     RowBox[{"L", "=", 
      RowBox[{"Sqrt", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"Abs", "[", "b", "]"}], "^", "2"}], "+", 
        RowBox[{
         RowBox[{"Abs", "[", "d", "]"}], "^", "2"}]}], "]"}]}], ";", "\n", 
     RowBox[{"u", "=", 
      RowBox[{"b", "/", "L"}]}], ";", "\n", 
     RowBox[{"nu", "=", 
      RowBox[{"d", "/", "L"}]}], ";", "\n", 
     RowBox[{"mu", "=", 
      RowBox[{
       RowBox[{"a", "*", 
        RowBox[{"Conjugate", "[", "u", "]"}]}], "+", 
       RowBox[{"c", "*", 
        RowBox[{"Conjugate", "[", "nu", "]"}]}]}]}], ";", "\n", 
     RowBox[{"{", "\n", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{
           RowBox[{"1", "/", "L"}], ",", "mu"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "L"}], "}"}]}], "}"}], ",", "\n", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{
           RowBox[{"Conjugate", "[", "nu", "]"}], ",", 
           RowBox[{"-", 
            RowBox[{"Conjugate", "[", "u", "]"}]}]}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"u", ",", "nu"}], "}"}]}], "}"}]}], "\n", "}"}]}]}], "\n", 
   "]"}]}]], "Code",
 CellLabel->
  "In[364]:=",ExpressionUUID->"5c66039f-b204-422e-9377-15f4f612c2ce"],

Cell[BoxData[
 RowBox[{
  RowBox[{"cs", "[", 
   RowBox[{"q_", ",", "p_"}], "]"}], ":=", 
  RowBox[{"Block", "[", 
   RowBox[{
    RowBox[{"{", "ck", "}"}], ",", "\n", 
    RowBox[{
     RowBox[{"ck", "=", 
      RowBox[{"Sort", "[", 
       RowBox[{
        RowBox[{"{", 
         RowBox[{"q", ",", "p"}], "}"}], ",", 
        RowBox[{
         RowBox[{"#1", "<", "#2"}], "&"}]}], "]"}]}], ";", "\n", 
     RowBox[{
      RowBox[{"Position", "[", 
       RowBox[{
        RowBox[{"EE", "[", 
         RowBox[{"[", 
          RowBox[{"1", ";;", "10"}], "]"}], "]"}], ",", "ck"}], "]"}], "[", 
      RowBox[{"[", 
       RowBox[{"1", ",", "1"}], "]"}], "]"}]}]}], "\n", "]"}]}]], "Code",
 CellChangeTimes->{{3.86531182799135*^9, 3.865311904774376*^9}, {
  3.865311938245144*^9, 3.865312057284198*^9}, {3.865312097274434*^9, 
  3.8653121303034444`*^9}},
 CellLabel->
  "In[365]:=",ExpressionUUID->"e429112b-dcf2-41bf-b69b-b3f2f687d67f"],

Cell[BoxData[
 RowBox[{
  RowBox[{"ces1", "[", 
   RowBox[{"x_", ",", "y_"}], "]"}], ":=", 
  RowBox[{
   RowBox[{
    RowBox[{
     RowBox[{"(", 
      RowBox[{"-", "1"}], ")"}], "^", 
     RowBox[{"HeavisideTheta", "[", 
      RowBox[{"y", "-", "x"}], "]"}]}], "/", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"I", "*", "\[Gamma]"}], "-", "1"}], ")"}]}], "*", 
   RowBox[{"(", 
    RowBox[{
     RowBox[{
      RowBox[{
       RowBox[{
        RowBox[{
         RowBox[{"(", 
          RowBox[{
           RowBox[{"(", 
            RowBox[{
             RowBox[{"I", "*", "\[Gamma]"}], "+", 
             RowBox[{
              RowBox[{"(", 
               RowBox[{"-", "1"}], ")"}], "^", 
              RowBox[{"HeavisideTheta", "[", 
               RowBox[{"y", "-", "x"}], "]"}]}]}], ")"}], "*", 
           RowBox[{"#", "/", 
            RowBox[{"Tr", "[", "#", "]"}]}]}], ")"}], "&"}], "@", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"K1", "[", 
           RowBox[{"[", 
            RowBox[{"9", ",", "x", ",", "y"}], "]"}], "]"}], ".", 
          RowBox[{"K1", "[", 
           RowBox[{"[", 
            RowBox[{"10", ",", "x", ",", "y"}], "]"}], "]"}]}], ")"}]}], "\n",
        "-", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"(", 
          RowBox[{
           RowBox[{
            RowBox[{"(", 
             RowBox[{"-", "1"}], ")"}], "^", 
            RowBox[{"HeavisideTheta", "[", 
             RowBox[{"y", "-", "x"}], "]"}]}], "+", "1"}], ")"}], "*", 
         RowBox[{"#", "/", 
          RowBox[{"Tr", "[", "#", "]"}]}]}], ")"}]}], "&"}], "@", 
     RowBox[{"(", 
      RowBox[{
       RowBox[{"K1", "[", 
        RowBox[{"[", 
         RowBox[{"9", ",", "x", ",", "y"}], "]"}], "]"}], ".", 
       RowBox[{"K1", "[", 
        RowBox[{"[", 
         RowBox[{"13", ",", "x", ",", "y"}], "]"}], "]"}]}], ")"}]}], 
    ")"}]}]}]], "Code",
 CellLabel->
  "In[393]:=",ExpressionUUID->"d8dd2bb4-30c1-4fc6-a7ff-848c3ed5d235"],

Cell[BoxData[
 RowBox[{
  RowBox[{"cet1", "[", 
   RowBox[{"x_", ",", "y_"}], "]"}], ":=", 
  RowBox[{
   RowBox[{
    RowBox[{
     RowBox[{"(", 
      RowBox[{"-", "1"}], ")"}], "^", 
     RowBox[{"HeavisideTheta", "[", 
      RowBox[{"y", "-", "x"}], "]"}]}], "/", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"I", "*", "\[Gamma]"}], "+", "1"}], ")"}]}], "*", 
   RowBox[{"(", 
    RowBox[{
     RowBox[{
      RowBox[{
       RowBox[{
        RowBox[{
         RowBox[{"(", 
          RowBox[{
           RowBox[{"(", 
            RowBox[{
             RowBox[{"I", "*", "\[Gamma]"}], "+", 
             RowBox[{
              RowBox[{"(", 
               RowBox[{"-", "1"}], ")"}], "^", 
              RowBox[{"HeavisideTheta", "[", 
               RowBox[{"y", "-", "x"}], "]"}]}]}], ")"}], "*", 
           RowBox[{"#", "/", 
            RowBox[{"Tr", "[", "#", "]"}]}]}], ")"}], "&"}], "@", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"K1", "[", 
           RowBox[{"[", 
            RowBox[{"9", ",", "x", ",", "y"}], "]"}], "]"}], ".", 
          RowBox[{"K1", "[", 
           RowBox[{"[", 
            RowBox[{"10", ",", "x", ",", "y"}], "]"}], "]"}]}], ")"}]}], "\n",
        "-", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"(", 
          RowBox[{
           RowBox[{
            RowBox[{"(", 
             RowBox[{"-", "1"}], ")"}], "^", 
            RowBox[{"HeavisideTheta", "[", 
             RowBox[{"y", "-", "x"}], "]"}]}], "-", "1"}], ")"}], "*", 
         RowBox[{"#", "/", 
          RowBox[{"Tr", "[", "#", "]"}]}]}], ")"}]}], "&"}], "@", 
     RowBox[{"(", 
      RowBox[{
       RowBox[{"K1", "[", 
        RowBox[{"[", 
         RowBox[{"14", ",", "x", ",", "y"}], "]"}], "]"}], ".", 
       RowBox[{"K1", "[", 
        RowBox[{"[", 
         RowBox[{"10", ",", "x", ",", "y"}], "]"}], "]"}]}], ")"}]}], 
    ")"}]}]}]], "Code",
 CellLabel->
  "In[395]:=",ExpressionUUID->"7c3fc0ec-eb8a-4b61-a32f-bc4516ce5b87"],

Cell[BoxData[
 RowBox[{
  RowBox[{"cet", "[", 
   RowBox[{"x_", ",", "y_"}], "]"}], ":=", 
  RowBox[{
   RowBox[{
    RowBox[{"(", 
     RowBox[{"-", "1"}], ")"}], "^", 
    RowBox[{"HeavisideTheta", "[", 
     RowBox[{"y", "-", "x"}], "]"}]}], "*", 
   RowBox[{
    RowBox[{"K1", "[", 
     RowBox[{"[", 
      RowBox[{"3", ",", 
       RowBox[{"cs", "[", 
        RowBox[{"x", ",", "y"}], "]"}]}], "]"}], "]"}], "/", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"I", "*", "\[Gamma]"}], "+", "1"}], ")"}]}], "*", 
   RowBox[{"(", 
    RowBox[{
     RowBox[{
      RowBox[{
       RowBox[{
        RowBox[{
         RowBox[{"(", 
          RowBox[{
           RowBox[{"(", 
            RowBox[{
             RowBox[{"I", "*", "\[Gamma]"}], "+", 
             RowBox[{
              RowBox[{"(", 
               RowBox[{"-", "1"}], ")"}], "^", 
              RowBox[{"HeavisideTheta", "[", 
               RowBox[{"y", "-", "x"}], "]"}]}]}], ")"}], "*", 
           RowBox[{"#", "/", 
            RowBox[{"Tr", "[", "#", "]"}]}]}], ")"}], "&"}], "@", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"K1", "[", 
           RowBox[{"[", 
            RowBox[{"9", ",", "x", ",", "y"}], "]"}], "]"}], ".", 
          RowBox[{"K1", "[", 
           RowBox[{"[", 
            RowBox[{"10", ",", "x", ",", "y"}], "]"}], "]"}]}], ")"}]}], "\n",
        "-", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"(", 
          RowBox[{
           RowBox[{
            RowBox[{"(", 
             RowBox[{"-", "1"}], ")"}], "^", 
            RowBox[{"HeavisideTheta", "[", 
             RowBox[{"y", "-", "x"}], "]"}]}], "-", "1"}], ")"}], "*", 
         RowBox[{"#", "/", 
          RowBox[{"Tr", "[", "#", "]"}]}]}], ")"}]}], "&"}], "@", 
     RowBox[{"(", 
      RowBox[{
       RowBox[{"K1", "[", 
        RowBox[{"[", 
         RowBox[{"14", ",", "x", ",", "y"}], "]"}], "]"}], ".", 
       RowBox[{"K1", "[", 
        RowBox[{"[", 
         RowBox[{"10", ",", "x", ",", "y"}], "]"}], "]"}]}], ")"}]}], 
    ")"}]}]}]], "Code",
 CellLabel->
  "In[396]:=",ExpressionUUID->"82031e61-36b8-4fdb-83d0-33c72a0397a4"],

Cell[BoxData[
 RowBox[{
  RowBox[{"cesR", "[", 
   RowBox[{"x_", ",", "y_"}], "]"}], ":=", 
  RowBox[{
   RowBox[{
    RowBox[{"(", 
     RowBox[{"-", "1"}], ")"}], "^", 
    RowBox[{"HeavisideTheta", "[", 
     RowBox[{"y", "-", "x"}], "]"}]}], "*", 
   RowBox[{
    RowBox[{"K2", "[", 
     RowBox[{"[", 
      RowBox[{"3", ",", 
       RowBox[{"cs", "[", 
        RowBox[{"x", ",", "y"}], "]"}]}], "]"}], "]"}], "/", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"I", "*", "\[Gamma]"}], "-", "1"}], ")"}]}], "*", 
   RowBox[{"(", 
    RowBox[{
     RowBox[{
      RowBox[{
       RowBox[{
        RowBox[{
         RowBox[{"(", 
          RowBox[{
           RowBox[{"(", 
            RowBox[{
             RowBox[{"I", "*", "\[Gamma]"}], "+", 
             RowBox[{
              RowBox[{"(", 
               RowBox[{"-", "1"}], ")"}], "^", 
              RowBox[{"HeavisideTheta", "[", 
               RowBox[{"y", "-", "x"}], "]"}]}]}], ")"}], "*", 
           RowBox[{"#", "/", 
            RowBox[{"Tr", "[", "#", "]"}]}]}], ")"}], "&"}], "@", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"K1", "[", 
           RowBox[{"[", 
            RowBox[{"9", ",", "x", ",", "y"}], "]"}], "]"}], ".", 
          RowBox[{"K1", "[", 
           RowBox[{"[", 
            RowBox[{"10", ",", "x", ",", "y"}], "]"}], "]"}]}], ")"}]}], "\n",
        "-", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"(", 
          RowBox[{
           RowBox[{
            RowBox[{"(", 
             RowBox[{"-", "1"}], ")"}], "^", 
            RowBox[{"HeavisideTheta", "[", 
             RowBox[{"y", "-", "x"}], "]"}]}], "+", "1"}], ")"}], "*", 
         RowBox[{"#", "/", 
          RowBox[{"Tr", "[", "#", "]"}]}]}], ")"}]}], "&"}], "@", 
     RowBox[{"(", 
      RowBox[{
       RowBox[{"K1", "[", 
        RowBox[{"[", 
         RowBox[{"9", ",", "x", ",", "y"}], "]"}], "]"}], ".", 
       RowBox[{"K1", "[", 
        RowBox[{"[", 
         RowBox[{"13", ",", "x", ",", "y"}], "]"}], "]"}]}], ")"}]}], 
    ")"}]}]}]], "Code",
 CellLabel->
  "In[397]:=",ExpressionUUID->"3cae80d1-d279-44ed-8f3b-8cdf6c5e2dda"],

Cell[BoxData[
 RowBox[{
  RowBox[{"ces", "[", 
   RowBox[{"x_", ",", "y_"}], "]"}], ":=", 
  RowBox[{
   RowBox[{
    RowBox[{"(", 
     RowBox[{"-", "1"}], ")"}], "^", 
    RowBox[{"HeavisideTheta", "[", 
     RowBox[{"y", "-", "x"}], "]"}]}], "*", 
   RowBox[{
    RowBox[{"K1", "[", 
     RowBox[{"[", 
      RowBox[{"3", ",", 
       RowBox[{"cs", "[", 
        RowBox[{"x", ",", "y"}], "]"}]}], "]"}], "]"}], "/", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"I", "*", "\[Gamma]"}], "-", "1"}], ")"}]}], "*", 
   RowBox[{"(", 
    RowBox[{
     RowBox[{
      RowBox[{
       RowBox[{
        RowBox[{
         RowBox[{"(", 
          RowBox[{
           RowBox[{"(", 
            RowBox[{
             RowBox[{"I", "*", "\[Gamma]"}], "+", 
             RowBox[{
              RowBox[{"(", 
               RowBox[{"-", "1"}], ")"}], "^", 
              RowBox[{"HeavisideTheta", "[", 
               RowBox[{"y", "-", "x"}], "]"}]}]}], ")"}], "*", 
           RowBox[{"#", "/", 
            RowBox[{"Tr", "[", "#", "]"}]}]}], ")"}], "&"}], "@", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"K1", "[", 
           RowBox[{"[", 
            RowBox[{"9", ",", "x", ",", "y"}], "]"}], "]"}], ".", 
          RowBox[{"K1", "[", 
           RowBox[{"[", 
            RowBox[{"10", ",", "x", ",", "y"}], "]"}], "]"}]}], ")"}]}], "\n",
        "-", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"(", 
          RowBox[{
           RowBox[{
            RowBox[{"(", 
             RowBox[{"-", "1"}], ")"}], "^", 
            RowBox[{"HeavisideTheta", "[", 
             RowBox[{"y", "-", "x"}], "]"}]}], "+", "1"}], ")"}], "*", 
         RowBox[{"#", "/", 
          RowBox[{"Tr", "[", "#", "]"}]}]}], ")"}]}], "&"}], "@", 
     RowBox[{"(", 
      RowBox[{
       RowBox[{"K1", "[", 
        RowBox[{"[", 
         RowBox[{"9", ",", "x", ",", "y"}], "]"}], "]"}], ".", 
       RowBox[{"K1", "[", 
        RowBox[{"[", 
         RowBox[{"13", ",", "x", ",", "y"}], "]"}], "]"}]}], ")"}]}], 
    ")"}]}]}]], "Code",
 CellLabel->
  "In[398]:=",ExpressionUUID->"0ff1f28a-d75f-4e97-8cbd-52eb036f1365"],

Cell[BoxData[
 RowBox[{
  RowBox[{"cek", "[", 
   RowBox[{"x_", ",", "y_"}], "]"}], ":=", 
  RowBox[{
   RowBox[{
    RowBox[{
     RowBox[{"K1", "[", 
      RowBox[{"[", 
       RowBox[{"7", ",", "x"}], "]"}], "]"}], ".", 
     RowBox[{"cet", "[", 
      RowBox[{"x", ",", "y"}], "]"}], ".", 
     RowBox[{"Inverse", "[", 
      RowBox[{"K1", "[", 
       RowBox[{"[", 
        RowBox[{"7", ",", "x"}], "]"}], "]"}], "]"}]}], "+", 
    RowBox[{
     RowBox[{"K1", "[", 
      RowBox[{"[", 
       RowBox[{"7", ",", "y"}], "]"}], "]"}], ".", 
     RowBox[{"cet", "[", 
      RowBox[{"y", ",", "x"}], "]"}], ".", 
     RowBox[{"Inverse", "[", 
      RowBox[{"K1", "[", 
       RowBox[{"[", 
        RowBox[{"7", ",", "y"}], "]"}], "]"}], "]"}]}]}], "//", 
   "Chop"}]}]], "Code",
 CellLabel->
  "In[399]:=",ExpressionUUID->"44f29184-bbbc-49c0-a883-2aeb290d1cf2"],

Cell[BoxData[
 RowBox[{
  RowBox[{"cer1", "[", 
   RowBox[{"x_", ",", "y_", ",", "K1_"}], "]"}], ":=", 
  RowBox[{
   RowBox[{
    RowBox[{"Inverse", "[", "K1", "]"}], ".", 
    RowBox[{"ces", "[", 
     RowBox[{"x", ",", "y"}], "]"}], ".", "K1"}], "//", "Chop"}]}]], "Code",
 CellLabel->
  "In[400]:=",ExpressionUUID->"14d12671-9541-41be-9ee0-3bb54541cd96"],

Cell[BoxData[
 RowBox[{
  RowBox[{"cer", "[", 
   RowBox[{"x_", ",", "y_"}], "]"}], ":=", 
  RowBox[{
   RowBox[{
    RowBox[{
     RowBox[{"Inverse", "[", 
      RowBox[{"K1", "[", 
       RowBox[{"[", 
        RowBox[{"8", ",", "x"}], "]"}], "]"}], "]"}], ".", 
     RowBox[{"ces", "[", 
      RowBox[{"x", ",", "y"}], "]"}], ".", 
     RowBox[{"K1", "[", 
      RowBox[{"[", 
       RowBox[{"8", ",", "x"}], "]"}], "]"}]}], "+", 
    RowBox[{
     RowBox[{"Inverse", "[", 
      RowBox[{"K1", "[", 
       RowBox[{"[", 
        RowBox[{"8", ",", "y"}], "]"}], "]"}], "]"}], ".", 
     RowBox[{"ces", "[", 
      RowBox[{"y", ",", "x"}], "]"}], ".", 
     RowBox[{"K1", "[", 
      RowBox[{"[", 
       RowBox[{"8", ",", "y"}], "]"}], "]"}]}]}], "//", "Chop"}]}]], "Code",
 CellLabel->
  "In[401]:=",ExpressionUUID->"91021d74-400e-448f-a3a5-ead73d7ff4e1"],

Cell[BoxData[
 RowBox[{
  RowBox[{"dcs", "=", 
   RowBox[{"Table", "[", 
    RowBox[{
     RowBox[{"decompose", "[", 
      RowBox[{"Inverse", "[", 
       RowBox[{"K1", "[", 
        RowBox[{"[", 
         RowBox[{"7", ",", "x"}], "]"}], "]"}], "]"}], "]"}], ",", 
     RowBox[{"{", 
      RowBox[{"x", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";"}]], "Code",
 CellLabel->
  "In[402]:=",ExpressionUUID->"d4e7e04a-7300-4955-a711-a31ed02c15e4"],

Cell[BoxData[
 RowBox[{
  RowBox[{"des", "=", 
   RowBox[{"Table", "[", 
    RowBox[{
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"x", "==", "y"}], ",", "0", ",", 
       RowBox[{"cer1", "[", 
        RowBox[{"x", ",", "y", ",", 
         RowBox[{"dcs", "[", 
          RowBox[{"[", 
           RowBox[{"x", ",", "1"}], "]"}], "]"}]}], "]"}]}], "]"}], ",", 
     RowBox[{"{", 
      RowBox[{"x", ",", "1", ",", "5"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"y", ",", "1", ",", "5"}], "}"}]}], "]"}]}], ";"}]], "Code",
 CellLabel->
  "In[403]:=",ExpressionUUID->"8856b4f0-6fb0-4afc-8cce-1e2c5b3d2a1d"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"(*", 
   RowBox[{"No", " ", "conormal"}], "*)"}], "\n", 
  RowBox[{
   RowBox[{
    RowBox[{"Tr", "[", 
     RowBox[{"\[Eta]", ".", 
      RowBox[{"HodgeDual", "[", 
       RowBox[{
        RowBox[{"bivechalfto1", "[", 
         RowBox[{"ces", "[", 
          RowBox[{"3", ",", 
           RowBox[{"#", "[", 
            RowBox[{"[", "1", "]"}], "]"}]}], "]"}], "]"}], ".", "\[Eta]"}], 
       "]"}], ".", "\[Eta]", ".", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{"bivechalfto1", "[", 
         RowBox[{"ces", "[", 
          RowBox[{"3", ",", 
           RowBox[{"#", "[", 
            RowBox[{"[", "2", "]"}], "]"}]}], "]"}], "]"}], ".", "\[Eta]"}], 
       ")"}]}], "]"}], "&"}], "/@", 
   RowBox[{"Subsets", "[", 
    RowBox[{
     RowBox[{"DeleteCases", "[", 
      RowBox[{
       RowBox[{"Range", "[", 
        RowBox[{"1", ",", "5"}], "]"}], ",", "3"}], "]"}], ",", 
     RowBox[{"{", "2", "}"}]}], "]"}]}]}]], "Code",
 CellChangeTimes->{{3.86531248123844*^9, 
  3.865312491567316*^9}},ExpressionUUID->"c82d3ded-c2ce-485d-907c-\
43b2cca6d343"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"-", "0.002392434775559995`"}], ",", "0.003701591703527879`", ",", 
   RowBox[{"-", "0.0013091569279806425`"}], ",", 
   RowBox[{"-", "0.24709948728579856`"}], ",", "0.2447070525102418`", ",", 
   RowBox[{"-", "0.2433978955822656`"}]}], "}"}]], "Output",
 CellChangeTimes->{3.865311421334078*^9, 3.8653121491322203`*^9, 
  3.8653122240015087`*^9, 3.865312294465495*^9},
 CellLabel->
  "Out[404]=",ExpressionUUID->"03c20e79-688a-49d5-b8a0-36cf6532c54e"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"(*", 
   RowBox[{"No", " ", "conormal"}], "*)"}], "\n", 
  RowBox[{
   RowBox[{
    RowBox[{"Tr", "[", 
     RowBox[{"\[Eta]", ".", 
      RowBox[{"HodgeDual", "[", 
       RowBox[{
        RowBox[{"bivechalfto1", "[", 
         RowBox[{"des", "[", 
          RowBox[{"[", 
           RowBox[{"3", ",", 
            RowBox[{"#", "[", 
             RowBox[{"[", "1", "]"}], "]"}]}], "]"}], "]"}], "]"}], ".", 
        "\[Eta]"}], "]"}], ".", "\[Eta]", ".", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{"bivechalfto1", "[", 
         RowBox[{"des", "[", 
          RowBox[{"[", 
           RowBox[{"3", ",", 
            RowBox[{"#", "[", 
             RowBox[{"[", "2", "]"}], "]"}]}], "]"}], "]"}], "]"}], ".", 
        "\[Eta]"}], ")"}]}], "]"}], "&"}], "/@", 
   RowBox[{"Subsets", "[", 
    RowBox[{
     RowBox[{"DeleteCases", "[", 
      RowBox[{
       RowBox[{"Range", "[", 
        RowBox[{"1", ",", "5"}], "]"}], ",", "3"}], "]"}], ",", 
     RowBox[{"{", "2", "}"}]}], "]"}]}]}]], "Code",
 CellChangeTimes->{{3.865312496350561*^9, 
  3.8653124968495646`*^9}},ExpressionUUID->"94ec0829-7f51-4b65-8a2d-\
598e2f358693"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"0.004197225886084177`", ",", 
   RowBox[{"-", "0.005615588054769971`"}], ",", "0.0014183621686742892`", ",", 
   RowBox[{"-", "0.24701533296122918`"}], ",", "0.25121255884731664`", ",", 
   RowBox[{"-", "0.2526309210159947`"}]}], "}"}]], "Output",
 CellChangeTimes->{3.865312152261454*^9, 3.865312225397902*^9, 
  3.8653122962662992`*^9},
 CellLabel->
  "Out[405]=",ExpressionUUID->"dbe1378a-9317-4379-98fa-67b61fce34de"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"(*", 
   RowBox[{"Diagonal", " ", "Result", " ", "fulfills", " ", "closure"}], 
   "*)"}], "\n", 
  RowBox[{
   RowBox[{
    RowBox[{"Total", "[", 
     RowBox[{
      RowBox[{
       RowBox[{"des", "[", 
        RowBox[{"[", 
         RowBox[{"1", ",", "#"}], "]"}], "]"}], "&"}], "/@", 
      RowBox[{"DeleteCases", "[", 
       RowBox[{
        RowBox[{"Range", "[", 
         RowBox[{"1", ",", "5"}], "]"}], ",", "1"}], "]"}]}], "]"}], "//", 
    "Chop"}], "\n", 
   RowBox[{
    RowBox[{"Total", "[", 
     RowBox[{
      RowBox[{
       RowBox[{"des", "[", 
        RowBox[{"[", 
         RowBox[{"2", ",", "#"}], "]"}], "]"}], "&"}], "/@", 
      RowBox[{"DeleteCases", "[", 
       RowBox[{
        RowBox[{"Range", "[", 
         RowBox[{"1", ",", "5"}], "]"}], ",", "2"}], "]"}]}], "]"}], "//", 
    "Chop"}], "\n", 
   RowBox[{
    RowBox[{"Total", "[", 
     RowBox[{
      RowBox[{
       RowBox[{"des", "[", 
        RowBox[{"[", 
         RowBox[{"3", ",", "#"}], "]"}], "]"}], "&"}], "/@", 
      RowBox[{"DeleteCases", "[", 
       RowBox[{
        RowBox[{"Range", "[", 
         RowBox[{"1", ",", "5"}], "]"}], ",", "3"}], "]"}]}], "]"}], "//", 
    "Chop"}], "\n", 
   RowBox[{
    RowBox[{"Total", "[", 
     RowBox[{
      RowBox[{
       RowBox[{"des", "[", 
        RowBox[{"[", 
         RowBox[{"4", ",", "#"}], "]"}], "]"}], "&"}], "/@", 
      RowBox[{"DeleteCases", "[", 
       RowBox[{
        RowBox[{"Range", "[", 
         RowBox[{"1", ",", "5"}], "]"}], ",", "4"}], "]"}]}], "]"}], "//", 
    "Chop"}], "\n", 
   RowBox[{
    RowBox[{"Total", "[", 
     RowBox[{
      RowBox[{
       RowBox[{"des", "[", 
        RowBox[{"[", 
         RowBox[{"5", ",", "#"}], "]"}], "]"}], "&"}], "/@", 
      RowBox[{"DeleteCases", "[", 
       RowBox[{
        RowBox[{"Range", "[", 
         RowBox[{"1", ",", "5"}], "]"}], ",", "5"}], "]"}]}], "]"}], "//", 
    "Chop"}]}]}]], "Code",
 CellChangeTimes->{{3.8653123351265087`*^9, 3.865312354324274*^9}},
 CellLabel->
  "In[419]:=",ExpressionUUID->"55793319-5958-4c6a-9674-2d298bb9d75b"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{
     RowBox[{
      RowBox[{"-", "9.896100495253053`"}], "-", 
      RowBox[{"0.0007009051196899888`", " ", "\[ImaginaryI]"}]}], ",", "0"}], 
    "}"}], ",", 
   RowBox[{"{", 
    RowBox[{"0", ",", 
     RowBox[{
      RowBox[{"-", "9.896100495253048`"}], "-", 
      RowBox[{"0.0007009051196923272`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], 
  "}"}]], "Output",
 CellChangeTimes->{
  3.8653114388363605`*^9, {3.8653121536477222`*^9, 3.86531218000422*^9}, {
   3.865312226850256*^9, 3.8653122361695104`*^9}, 3.8653122976920567`*^9, 
   3.8653123713953247`*^9},
 CellLabel->
  "Out[419]=",ExpressionUUID->"220357cc-46f1-4c3e-af94-e772bcecee1f"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{
     RowBox[{
      RowBox[{"-", "0.5553308325074824`"}], "-", 
      RowBox[{"0.001919125881725759`", " ", "\[ImaginaryI]"}]}], ",", "0"}], 
    "}"}], ",", 
   RowBox[{"{", 
    RowBox[{"0", ",", 
     RowBox[{
      RowBox[{"-", "0.5553308325074824`"}], "-", 
      RowBox[{"0.0019191258817255787`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], 
  "}"}]], "Output",
 CellChangeTimes->{
  3.8653114388363605`*^9, {3.8653121536477222`*^9, 3.86531218000422*^9}, {
   3.865312226850256*^9, 3.8653122361695104`*^9}, 3.8653122976920567`*^9, 
   3.8653123714043226`*^9},
 CellLabel->
  "Out[420]=",ExpressionUUID->"b864e9c6-2b13-48d7-86e3-126811c9ff90"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{
     RowBox[{"1.462504876214577`", "\[VeryThinSpace]", "-", 
      RowBox[{"0.0006226185264376072`", " ", "\[ImaginaryI]"}]}], ",", "0"}], 
    "}"}], ",", 
   RowBox[{"{", 
    RowBox[{"0", ",", 
     RowBox[{"1.4625048762145756`", "\[VeryThinSpace]", "-", 
      RowBox[{"0.0006226185264377251`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], 
  "}"}]], "Output",
 CellChangeTimes->{
  3.8653114388363605`*^9, {3.8653121536477222`*^9, 3.86531218000422*^9}, {
   3.865312226850256*^9, 3.8653122361695104`*^9}, 3.8653122976920567`*^9, 
   3.865312371407323*^9},
 CellLabel->
  "Out[421]=",ExpressionUUID->"17051ff4-6335-495b-af60-75ea43f384cd"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{
     RowBox[{"3.4828615657145785`", "\[VeryThinSpace]", "+", 
      RowBox[{"0.0008369710102453451`", " ", "\[ImaginaryI]"}]}], ",", "0"}], 
    "}"}], ",", 
   RowBox[{"{", 
    RowBox[{"0", ",", 
     RowBox[{"3.4828615657145825`", "\[VeryThinSpace]", "+", 
      RowBox[{"0.0008369710102452861`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], 
  "}"}]], "Output",
 CellChangeTimes->{
  3.8653114388363605`*^9, {3.8653121536477222`*^9, 3.86531218000422*^9}, {
   3.865312226850256*^9, 3.8653122361695104`*^9}, 3.8653122976920567`*^9, 
   3.8653123714103236`*^9},
 CellLabel->
  "Out[422]=",ExpressionUUID->"4c42b0e2-24e7-4d51-9fb9-b1fc4e9d9e2e"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{
     RowBox[{"5.506064885831374`", "\[VeryThinSpace]", "+", 
      RowBox[{"0.002405678517607937`", " ", "\[ImaginaryI]"}]}], ",", "0"}], 
    "}"}], ",", 
   RowBox[{"{", 
    RowBox[{"0", ",", 
     RowBox[{"5.506064885831377`", "\[VeryThinSpace]", "+", 
      RowBox[{"0.0024056785176101124`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], 
  "}"}]], "Output",
 CellChangeTimes->{
  3.8653114388363605`*^9, {3.8653121536477222`*^9, 3.86531218000422*^9}, {
   3.865312226850256*^9, 3.8653122361695104`*^9}, 3.8653122976920567`*^9, 
   3.8653123714133234`*^9},
 CellLabel->
  "Out[423]=",ExpressionUUID->"e0a8b61e-a185-4ae0-9289-f27c6e861b5a"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"(*", 
   RowBox[{
   "0", " ", "means", " ", "fulfills", " ", "Parallel", " ", "Condition"}], 
   "*)"}], "\n", 
  RowBox[{
   RowBox[{
    RowBox[{"cer", "[", 
     RowBox[{
      RowBox[{"#", "[", 
       RowBox[{"[", "1", "]"}], "]"}], ",", 
      RowBox[{"#", "[", 
       RowBox[{"[", "2", "]"}], "]"}]}], "]"}], "&"}], "/@", 
   RowBox[{"EE", "[", 
    RowBox[{"[", 
     RowBox[{"1", ";;", "10"}], "]"}], "]"}]}]}]], "Code",
 CellChangeTimes->{{3.865312409941391*^9, 
  3.865312467195551*^9}},ExpressionUUID->"c81cebec-7e71-415f-8b12-\
3f1d4d2b729d"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"0", ",", "0"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"0", ",", "0"}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"0", ",", "0"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"0", ",", "0"}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"0", ",", "0"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"0", ",", "0"}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"0", ",", "0"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"0", ",", "0"}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"0", ",", "0"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"0", ",", "0"}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"0", ",", "0"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"0", ",", "0"}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"0", ",", "0"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"0", ",", "0"}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"0", ",", "0"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"0", ",", "0"}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"0", ",", "0"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"0", ",", "0"}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"0", ",", "0"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"0", ",", "0"}], "}"}]}], "}"}]}], "}"}]], "Output",
 CellChangeTimes->{
  3.865311435525797*^9, 3.865312159421454*^9, 3.865312232991502*^9, 
   3.8653123009399843`*^9, 3.865312367347166*^9, {3.865312419942224*^9, 
   3.865312440986906*^9}},
 CellLabel->
  "Out[425]=",ExpressionUUID->"4b3fe7b9-6d7a-4bfe-afe2-eb42aa724daa"]
}, Open  ]]
}, Open  ]]
},
WindowSize->{775, 865},
WindowMargins->{{Automatic, 221}, {-102, Automatic}},
TaggingRules->Association[
 "CodeFormatter" -> 
  Association[
   "ToolbarState" -> False, "ToolbarAccentColor" -> RGBColor["#2497b7"]]],
Magnification:>1. Inherited,
FrontEndVersion->"12.3 for Microsoft Windows (64-bit) (2021\:5e747\:670823\
\:65e5)",
StyleDefinitions->"Script.nb",
ExpressionUUID->"f93f005f-5ba0-405d-860d-95a0d14aec42"
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[558, 20, 151, 2, 36, "Code",ExpressionUUID->"c2c3d3b2-108f-4033-8f1c-909768d07ea6"],
Cell[712, 24, 187, 4, 36, "Code",ExpressionUUID->"54dd8744-439d-4386-b087-80d6b1a2d26f"],
Cell[902, 30, 488, 15, 97, "Code",ExpressionUUID->"ea1ffef1-7bd2-4aad-8591-08c9fe7fce4e"],
Cell[1393, 47, 201, 4, 36, "Code",ExpressionUUID->"6beb8d45-ee52-487a-aa2d-eea63892328c"],
Cell[1597, 53, 148, 3, 36, "Code",ExpressionUUID->"6518b5b1-bee3-440a-8218-00adc9accdb5"],
Cell[1748, 58, 2367, 65, 157, "Code",ExpressionUUID->"21d6a4a5-c0f9-4dcb-85ba-1fec254874df"],
Cell[CellGroupData[{
Cell[4140, 127, 159, 3, 53, "Subtitle",ExpressionUUID->"95dbb536-a941-4a6b-ab63-8cf68732cf61"],
Cell[4302, 132, 161, 3, 36, "Code",ExpressionUUID->"83836997-625c-47dd-9e9b-18b7ffa3e3a3"],
Cell[4466, 137, 970, 29, 57, "Code",ExpressionUUID->"b3e12f49-5e51-4827-823c-ef69869ba444"],
Cell[5439, 168, 358, 8, 77, "Code",ExpressionUUID->"7742c24f-a863-4465-970a-9a34a97c0707"],
Cell[5800, 178, 2651, 88, 117, "Code",ExpressionUUID->"ddf4e606-7166-4732-88c4-d65045f0b2fa"],
Cell[8454, 268, 355, 10, 36, "Code",ExpressionUUID->"c6080365-a519-40e0-a68f-94f3c77b869d"],
Cell[8812, 280, 1387, 46, 97, "Code",ExpressionUUID->"f777f694-e656-48c4-8ae9-5638cee4b943"],
Cell[10202, 328, 1814, 54, 57, "Code",ExpressionUUID->"c805bbc5-94a9-452e-9fd3-99c133fa2716"],
Cell[12019, 384, 377, 11, 57, "Code",ExpressionUUID->"2653c7cc-dd04-4ea0-8d73-f16137868672"],
Cell[12399, 397, 435, 14, 77, "Code",ExpressionUUID->"ff0a4a83-eaf3-4560-9177-4a2886b46e0c"],
Cell[12837, 413, 3172, 99, 97, "Code",ExpressionUUID->"6e39e35a-2b9c-492b-9518-ae020d05a954"],
Cell[16012, 514, 361, 11, 36, "Code",ExpressionUUID->"9b1d5b96-d26d-464a-b3fd-1724cac7aa2a"],
Cell[CellGroupData[{
Cell[16398, 529, 214, 5, 77, "Code",ExpressionUUID->"65754b66-52a0-4c24-af2d-c99ac7c5159e"],
Cell[16615, 536, 182, 3, 26, "Output",ExpressionUUID->"fcc7698a-ce5a-4379-8edc-82f7ea8bcd43"],
Cell[16800, 541, 182, 3, 26, "Output",ExpressionUUID->"e21bd47a-d966-464c-8b2f-e37c093ce6a9"],
Cell[16985, 546, 183, 3, 26, "Output",ExpressionUUID->"c315cbd1-ff4b-4526-aa38-c95bda2ca440"]
}, Open  ]],
Cell[17183, 552, 555, 18, 57, "Code",ExpressionUUID->"09a29111-6330-435c-b5f5-ab601d43fa8e"],
Cell[17741, 572, 17195, 473, 637, "Code",ExpressionUUID->"ad61ee8b-a77f-4273-a249-5f56881c5010"],
Cell[34939, 1047, 24046, 669, 757, "Code",ExpressionUUID->"0e5db573-1eee-4bde-a3b2-21b0d993c90d"],
Cell[58988, 1718, 27453, 751, 857, "Code",ExpressionUUID->"7a4e72f8-ee12-4a29-abdc-71f696698122"],
Cell[86444, 2471, 18755, 515, 657, "Code",ExpressionUUID->"6fc0f921-9681-4435-abad-4f1d99f6cbe2"],
Cell[105202, 2988, 884, 27, 117, "Code",ExpressionUUID->"8d95355f-479e-4c06-ae1a-e0a113660173"],
Cell[106089, 3017, 1952, 57, 117, "Code",ExpressionUUID->"ff003fc2-f871-4367-8e06-1d3c76d6bc40"],
Cell[CellGroupData[{
Cell[108066, 3078, 8082, 208, 377, "Code",ExpressionUUID->"3ad259f5-0ad0-4c8a-ab05-d84385f4d588"],
Cell[116151, 3288, 201, 4, 26, "Output",ExpressionUUID->"7a6df25d-e9dc-4d7c-a4ac-04c6ed17e2c0"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[116401, 3298, 160, 3, 53, "Subtitle",ExpressionUUID->"d4fa18a4-0596-47fb-90d1-353757a6c60d"],
Cell[116564, 3303, 7403, 222, 537, "Code",ExpressionUUID->"2f2b4dd9-3159-44f5-90af-753538de7978"],
Cell[123970, 3527, 2189, 63, 137, "Code",ExpressionUUID->"56afb537-0a8b-427d-b853-1eb5e353c777"],
Cell[126162, 3592, 710, 22, 97, "Code",ExpressionUUID->"daff135e-b2f1-4220-b070-6b519894e50d"],
Cell[126875, 3616, 434, 12, 57, "Code",ExpressionUUID->"dfa18f15-9b4b-4f88-9ce7-b9df48240f40"],
Cell[127312, 3630, 616, 19, 36, "Code",ExpressionUUID->"9f56aba6-ef3e-40a6-9b52-05d76c39639f"],
Cell[127931, 3651, 391, 11, 36, "Code",ExpressionUUID->"31cb509f-d84d-4770-9370-f1c65678250a"],
Cell[128325, 3664, 481, 12, 36, "Code",ExpressionUUID->"4637f57d-6d8c-4947-bf61-3e73bd44add4"],
Cell[128809, 3678, 533, 14, 36, "Code",ExpressionUUID->"fe929c42-7ee0-4b10-961c-54de428674a8"],
Cell[129345, 3694, 4508, 120, 337, "Code",ExpressionUUID->"db4a86a3-d988-456b-b70b-6ad6ba7e2aa4"],
Cell[133856, 3816, 18085, 474, 2177, "Code",ExpressionUUID->"2c2c3e62-9df7-4d9e-a8f6-2c62fd49da35"]
}, Open  ]],
Cell[CellGroupData[{
Cell[151978, 4295, 172, 3, 53, "Subtitle",ExpressionUUID->"2a355f56-868e-4601-8724-e17779f3ec1a"],
Cell[152153, 4300, 217, 6, 36, "Code",ExpressionUUID->"40abb386-ce8f-4880-b9e1-bb6b677c7cc3"],
Cell[152373, 4308, 1346, 39, 36, "Code",ExpressionUUID->"009aa99b-c5e0-4e62-9d79-36a7997292c7"],
Cell[153722, 4349, 490, 16, 36, "Code",ExpressionUUID->"d1e16477-a000-4d74-91a6-a9eade4cfbf4"],
Cell[154215, 4367, 762, 24, 36, "Code",ExpressionUUID->"7e36e0d2-c6ef-4422-9180-2902b52f0d18"],
Cell[154980, 4393, 617, 20, 36, "Code",ExpressionUUID->"730bbb67-2c0a-4999-8b5c-35cd382150fc"],
Cell[155600, 4415, 717, 23, 36, "Code",ExpressionUUID->"c76dfab4-eb82-461d-8d13-d47f7bdcaa16"],
Cell[156320, 4440, 860, 27, 57, "Code",ExpressionUUID->"326b9a0e-0d14-4638-b343-311fd91bf3fc"],
Cell[157183, 4469, 189, 5, 36, "Code",ExpressionUUID->"9c1a788a-1315-48e0-838a-d8ce27695efb"],
Cell[157375, 4476, 2256, 59, 297, "Code",ExpressionUUID->"83f5e3de-75c4-4a29-9542-f107958ddc0c"],
Cell[159634, 4537, 8793, 240, 957, "Code",ExpressionUUID->"01b97a18-1f29-4926-b9a9-12ae35e28448"],
Cell[168430, 4779, 8718, 243, 577, "Code",ExpressionUUID->"15cd756d-c62b-465d-9705-e8391cbbbd93"]
}, Open  ]],
Cell[CellGroupData[{
Cell[177185, 5027, 165, 3, 53, "Subtitle",ExpressionUUID->"f5c6e927-9de6-46e8-a126-70802ec33039"],
Cell[177353, 5032, 4036, 109, 417, "Code",ExpressionUUID->"bf0fc981-672d-4332-ad77-6b3da2333204"]
}, Open  ]],
Cell[CellGroupData[{
Cell[181426, 5146, 167, 3, 53, "Subtitle",ExpressionUUID->"04f80573-e603-4932-b8b0-7254e56af200"],
Cell[181596, 5151, 299, 7, 57, "Code",ExpressionUUID->"97cb21e0-35b8-421b-ac3c-560fabcca6cf"],
Cell[181898, 5160, 375, 10, 57, "Code",ExpressionUUID->"9cf062da-6d88-47bf-a133-87e6d2174c75"],
Cell[182276, 5172, 1561, 53, 237, "Code",ExpressionUUID->"c7d833b1-5746-4b77-8d1b-f15af96f657d"],
Cell[183840, 5227, 399, 10, 57, "Code",ExpressionUUID->"1dcf2059-7c3f-4133-b1d0-7aaf26b2f132"],
Cell[CellGroupData[{
Cell[184264, 5241, 163, 3, 54, "Subsection",ExpressionUUID->"098e6bbb-b120-44e0-8897-124d9ce6d704"],
Cell[184430, 5246, 150, 4, 36, "Code",ExpressionUUID->"b3a33e8f-6288-4038-96b0-38910faeff22"],
Cell[184583, 5252, 150, 4, 36, "Code",ExpressionUUID->"1ccae822-e7c5-4a14-ae98-137028ef857f"],
Cell[CellGroupData[{
Cell[184758, 5260, 1807, 60, 157, "Code",ExpressionUUID->"934bfc49-a6a0-42a7-8d6a-10ff2c4981cd"],
Cell[186568, 5322, 196, 3, 26, "Output",ExpressionUUID->"f6140ab3-7549-4460-b840-24911d250ea5"]
}, Open  ]],
Cell[CellGroupData[{
Cell[186801, 5330, 4520, 120, 437, "Code",ExpressionUUID->"526f1069-f3ec-4411-929e-61ea182fe87f"],
Cell[191324, 5452, 186, 3, 26, "Output",ExpressionUUID->"c764ee45-cfae-4271-b567-ed2c6d60607c"]
}, Open  ]],
Cell[CellGroupData[{
Cell[191547, 5460, 398, 11, 36, "Code",ExpressionUUID->"71a83527-785e-4c39-9454-519a84216fda"],
Cell[191948, 5473, 243, 6, 26, "Output",ExpressionUUID->"320db39c-2e1f-4362-8f69-5e5bfc97f083"]
}, Open  ]],
Cell[CellGroupData[{
Cell[192228, 5484, 360, 9, 36, "Code",ExpressionUUID->"3db9082c-ca19-4943-a60d-2e0aef695458"],
Cell[192591, 5495, 370, 8, 26, "Output",ExpressionUUID->"1ac85e3c-74ba-4b6b-be16-6187b9daf409"]
}, Open  ]]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[193022, 5510, 161, 3, 53, "Subtitle",ExpressionUUID->"1cb56c09-6ed5-4f69-96a4-ebd7fcbf9f09"],
Cell[193186, 5515, 266, 7, 36, "Code",ExpressionUUID->"f0bd6c66-0bfe-454f-818a-a1e9a172e36d"],
Cell[193455, 5524, 211, 6, 57, "Code",ExpressionUUID->"7effc5db-77f5-4ba4-9ffa-49782ad195af"],
Cell[CellGroupData[{
Cell[193691, 5534, 778, 23, 77, "Code",ExpressionUUID->"15159e2a-9969-40f4-b55b-1ead716a503d"],
Cell[194472, 5559, 202, 4, 26, "Output",ExpressionUUID->"6f377739-ded0-458e-bc90-25a14b336634"]
}, Open  ]],
Cell[194689, 5566, 238, 6, 36, "Code",ExpressionUUID->"3f28c950-c026-4b24-862d-5526c83bd614"],
Cell[CellGroupData[{
Cell[194952, 5576, 2531, 73, 237, "Code",ExpressionUUID->"b101eebf-cf2d-49af-9d7f-461b7017cfa6"],
Cell[197486, 5651, 160, 3, 26, "Output",ExpressionUUID->"b8334403-b17b-4171-a506-b7f8e51dc49d"]
}, Open  ]],
Cell[CellGroupData[{
Cell[197683, 5659, 178, 3, 36, "Code",ExpressionUUID->"6812f21b-e834-4a16-a9f9-86bf5d611182"],
Cell[197864, 5664, 155, 3, 26, "Output",ExpressionUUID->"2b1cb5e3-c17d-4b7d-87c2-2b1b06a2ac97"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[198068, 5673, 161, 3, 53, "Subtitle",ExpressionUUID->"d1936079-bb22-4dca-b780-46b6705ba24f"],
Cell[198232, 5678, 1864, 60, 97, "Code",ExpressionUUID->"3287e57b-bfa6-4758-9f9c-4aef5b200da9"],
Cell[CellGroupData[{
Cell[200121, 5742, 281, 7, 36, "Code",ExpressionUUID->"200dbd49-4682-41cd-b241-e794beb6026b"],
Cell[200405, 5751, 267, 6, 30, "Output",ExpressionUUID->"d8772806-f044-4ff9-b470-2dbdbfcbd418"]
}, Open  ]],
Cell[200687, 5760, 347, 10, 57, "Code",ExpressionUUID->"5245efd4-a671-4a33-b0db-1802b47c1423"],
Cell[201037, 5772, 235, 6, 36, "Code",ExpressionUUID->"36f28b50-5012-4a9e-9aae-27b27d8145ab"],
Cell[201275, 5780, 324, 7, 57, "Code",ExpressionUUID->"2c9c36cb-7e98-4fad-909c-2829e0f83968"],
Cell[CellGroupData[{
Cell[201624, 5791, 181, 4, 36, "Code",ExpressionUUID->"277e6645-f54d-4986-a2b4-d15f169abd4b"],
Cell[201808, 5797, 179, 3, 26, "Output",ExpressionUUID->"d2673a7f-b630-4c8b-9b81-a81c6bf7026c"]
}, Open  ]],
Cell[CellGroupData[{
Cell[202024, 5805, 471, 13, 77, "Code",ExpressionUUID->"ca9b1324-dbbc-48e7-99f3-d94efdfa65f8"],
Cell[202498, 5820, 268, 6, 30, "Output",ExpressionUUID->"0d26a733-35f3-4eb1-913e-2c05170b474c"],
Cell[202769, 5828, 288, 6, 26, "Output",ExpressionUUID->"750076fe-63c2-4f3b-be5a-f2eabb48347b"],
Cell[203060, 5836, 285, 6, 26, "Output",ExpressionUUID->"3e126ef0-10f8-4423-9690-22ca40d215b9"]
}, Open  ]],
Cell[CellGroupData[{
Cell[203382, 5847, 203, 5, 36, "Code",ExpressionUUID->"8f50ecb2-bca5-4f69-8e44-04003513b910"],
Cell[203588, 5854, 271, 6, 27, "Output",ExpressionUUID->"8464c2f5-2ed9-4ad3-b53e-a2687851d1e6"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[203908, 5866, 166, 3, 53, "Subtitle",ExpressionUUID->"29a67418-de16-4cc5-9dcb-af8cd70ad5a8"],
Cell[204077, 5871, 255, 7, 36, "Code",ExpressionUUID->"f7460a9d-6de6-4011-86dc-250e3346f83c"],
Cell[CellGroupData[{
Cell[204357, 5882, 713, 22, 57, "Code",ExpressionUUID->"5ae8f8e7-e569-4bee-a342-2d569bb3ca67"],
Cell[205073, 5906, 5735, 163, 195, "Output",ExpressionUUID->"2435f794-6c0b-4d76-bda3-6bb062b417b9"]
}, Open  ]],
Cell[210823, 6072, 15066, 415, 437, "Code",ExpressionUUID->"0127380e-83a3-437c-9042-f086802e48fa"],
Cell[225892, 6489, 1766, 54, 237, "Code",ExpressionUUID->"5c66039f-b204-422e-9377-15f4f612c2ce"],
Cell[227661, 6545, 934, 27, 97, "Code",ExpressionUUID->"e429112b-dcf2-41bf-b69b-b3f2f687d67f"],
Cell[228598, 6574, 1968, 62, 57, "Code",ExpressionUUID->"d8dd2bb4-30c1-4fc6-a7ff-848c3ed5d235"],
Cell[230569, 6638, 1969, 62, 57, "Code",ExpressionUUID->"7c3fc0ec-eb8a-4b61-a32f-bc4516ce5b87"],
Cell[232541, 6702, 2120, 67, 57, "Code",ExpressionUUID->"82031e61-36b8-4fdb-83d0-33c72a0397a4"],
Cell[234664, 6771, 2120, 67, 57, "Code",ExpressionUUID->"3cae80d1-d279-44ed-8f3b-8cdf6c5e2dda"],
Cell[236787, 6840, 2119, 67, 57, "Code",ExpressionUUID->"0ff1f28a-d75f-4e97-8cbd-52eb036f1365"],
Cell[238909, 6909, 861, 28, 36, "Code",ExpressionUUID->"44f29184-bbbc-49c0-a883-2aeb290d1cf2"],
Cell[239773, 6939, 358, 10, 36, "Code",ExpressionUUID->"14d12671-9541-41be-9ee0-3bb54541cd96"],
Cell[240134, 6951, 857, 27, 36, "Code",ExpressionUUID->"91021d74-400e-448f-a3a5-ead73d7ff4e1"],
Cell[240994, 6980, 442, 13, 36, "Code",ExpressionUUID->"d4e7e04a-7300-4955-a711-a31ed02c15e4"],
Cell[241439, 6995, 618, 18, 36, "Code",ExpressionUUID->"8856b4f0-6fb0-4afc-8cce-1e2c5b3d2a1d"],
Cell[CellGroupData[{
Cell[242082, 7017, 1096, 33, 57, "Code",ExpressionUUID->"c82d3ded-c2ce-485d-907c-43b2cca6d343"],
Cell[243181, 7052, 503, 10, 26, "Output",ExpressionUUID->"03c20e79-688a-49d5-b8a0-36cf6532c54e"]
}, Open  ]],
Cell[CellGroupData[{
Cell[243721, 7067, 1169, 35, 57, "Code",ExpressionUUID->"94ec0829-7f51-4b65-8a2d-598e2f358693"],
Cell[244893, 7104, 461, 9, 26, "Output",ExpressionUUID->"dbe1378a-9317-4379-98fa-67b61fce34de"]
}, Open  ]],
Cell[CellGroupData[{
Cell[245391, 7118, 2095, 68, 137, "Code",ExpressionUUID->"55793319-5958-4c6a-9674-2d298bb9d75b"],
Cell[247489, 7188, 710, 20, 26, "Output",ExpressionUUID->"220357cc-46f1-4c3e-af94-e772bcecee1f"],
Cell[248202, 7210, 711, 20, 26, "Output",ExpressionUUID->"b864e9c6-2b13-48d7-86e3-126811c9ff90"],
Cell[248916, 7232, 705, 18, 26, "Output",ExpressionUUID->"17051ff4-6335-495b-af60-75ea43f384cd"],
Cell[249624, 7252, 708, 18, 26, "Output",ExpressionUUID->"4c42b0e2-24e7-4d51-9fb9-b1fc4e9d9e2e"],
Cell[250335, 7272, 705, 18, 26, "Output",ExpressionUUID->"e0a8b61e-a185-4ae0-9289-f27c6e861b5a"]
}, Open  ]],
Cell[CellGroupData[{
Cell[251077, 7295, 592, 19, 57, "Code",ExpressionUUID->"c81cebec-7e71-415f-8b12-3f1d4d2b729d"],
Cell[251672, 7316, 1975, 68, 47, "Output",ExpressionUUID->"4b3fe7b9-6d7a-4bfe-afe2-eb42aa724daa"]
}, Open  ]]
}, Open  ]]
}
]
*)

